OSDN Git Service

* typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / typedef5.C
index c382088..f9e7147 100644 (file)
@@ -1,8 +1,16 @@
-// Build don't link:
+// { dg-do assemble  }
 
 // by Alexandre Oliva <oliva@dcc.unicamp.br>
 
 typedef int t;
 typedef t* u;
+typedef u v;
+typedef v* (*w)(t);
 typedef int t;
 typedef t* u;
+typedef u v;
+typedef v* (*w)(t const); // this is ok
+typedef v* (*w)(t); // { dg-error "" } covers message `previously declared here'
+typedef v* (*const w)(t); // { dg-error "" } invalid redeclaration
+typedef v const* (*w)(t); // { dg-error "" } invalid redeclaration
+typedef v* const (*w)(t); // { dg-error "" } invalid redeclaration