aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.dg/parse/pragma2.C8
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e3e6ae7..6e3c262 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
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>
diff --git a/gcc/testsuite/g++.dg/parse/pragma2.C b/gcc/testsuite/g++.dg/parse/pragma2.C
new file mode 100644
index 0000000..9cab9d8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pragma2.C
@@ -0,0 +1,8 @@
+// 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 *-*-* } }