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
This commit is contained in:
parent
0d63048c5b
commit
5902897a20
@ -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>
|
||||
|
8
gcc/testsuite/g++.dg/parse/pragma2.C
Normal file
8
gcc/testsuite/g++.dg/parse/pragma2.C
Normal file
@ -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 *-*-* } }
|
Loading…
Reference in New Issue
Block a user