diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-12-23 22:19:54 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-12-23 22:19:54 +0000 |
commit | 5902897a20f64980c4b91886a3c31e412a67cf65 (patch) | |
tree | e33c82ab70dd83aa67ba4b2ad9ebca2a545e91ad /gcc/testsuite | |
parent | 0d63048c5b05fff144a7b3b8103cedf14839cac4 (diff) | |
download | gcc-5902897a20f64980c4b91886a3c31e412a67cf65.zip gcc-5902897a20f64980c4b91886a3c31e412a67cf65.tar.gz gcc-5902897a20f64980c4b91886a3c31e412a67cf65.tar.bz2 |
re PR c++/17595 (Unfriendly error message/rejects legal #pragmas in the middle of a parameter list)
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
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/pragma2.C | 8 |
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 *-*-* } } |