This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17595] New: Unfriendly error message for #pragmas in the middle of a parameter list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]