PR c++/9278
* decl.c (grokparms): Do not allow typedef-names in a '(void)'
parmlist.
* g++.dg/other/void1.C: New test.
From-SVN: r107508
+2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/9278
+ * decl.c (grokparms): Do not allow typedef-names in a '(void)'
+ parmlist.
+
2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* typeck2.c (process_init_constructor_union): Remove check for
if (VOID_TYPE_P (type))
{
if (same_type_p (type, void_type_node)
+ && DECL_SELF_REFERENCE_P (type)
&& !DECL_NAME (decl) && !result && !parm->next && !ellipsis)
/* this is a parmlist of `(void)', which is ok. */
break;
+2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/9278
+ * g++.dg/other/void1.C: New test.
+
2005-11-25 Joseph S. Myers <joseph@codesourcery.com>
PR middle-end/24998
--- /dev/null
+// PR c++/9278
+// { dg-do compile }
+
+typedef void VOID;
+
+int foo(void);
+int bar(VOID); // { dg-error "type|invalid use" }
+
+template<int> int foo(void);
+template<int> int bar(VOID); // { dg-error "type|invalid use" }
+
+struct A
+{
+ int foo(void);
+ int bar(VOID); // { dg-error "type|invalid use" }
+};