PR c++/17595
* parser.c (cp_parser_error): Issue better messages about
#pragma in locations where it is not permitted.
PR c++/17595
* g++.dg/parse/pragma2.C: New test.
From-SVN: r92573
2004-12-23 Mark Mitchell <mark@codesourcery.com>
+ PR c++/17595
+ * g++.dg/parse/pragma2.C: New test.
+
* g++.dg/opt/temp1.C: Make memcpy actually copy bytes.
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
--- /dev/null
+// PR c++/17595
+
+// Ideally, the #pragma error would come one line further down, but it
+// does not.
+int f(int x, // { dg-error "not allowed here" }
+#pragma interface
+ // The parser gets confused and issues an error on the next line.
+ int y); // { dg-bogus "" "" { xfail *-*-* } }