[Bug c++/17595] New: Unfriendly error message for #pragmas in the middle of a parameter list
austern at apple dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 21 23:28:00 GMT 2004
This code
int foo(int x,
#pragma wibble
int y);
used to be accepted. For some pragmas there was even a chance that it might do something useful.
As of today, however, we get this error message instead:
test.c:1: error: expected identifier before 'PRAGMA' token
test.c:1: error: expected `,' or `...' before 'PRAGMA' token
test.c:3: error: ISO C++ forbids declaration of `parameter' with no type
I don't object to forbidding pragmas in the middle of a parameter list, but this is an awfully unfriendly
error message. A user who gets this message won't be able to figure out what to do to fix the problem.
--
Summary: Unfriendly error message for #pragmas in the middle of a
parameter list
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: austern at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17595
More information about the Gcc-bugs
mailing list