This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17595] New: Unfriendly error message for #pragmas in the middle of a parameter list
- From: "austern at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Sep 2004 23:28:12 -0000
- Subject: [Bug c++/17595] New: Unfriendly error message for #pragmas in the middle of a parameter list
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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