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:
Mark Mitchell 2004-12-23 22:19:54 +00:00 committed by Mark Mitchell
parent 0d63048c5b
commit 5902897a20
2 changed files with 11 additions and 0 deletions

View File

@ -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>

View 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 *-*-* } }