http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58072

            Bug ID: 58072
           Summary: [C++11] Error messages involving user-defined literals
                    are poor (refer to tokens)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 3dw4rd at verizon dot net

Created attachment 30603
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30603&action=edit
Patch triggering a range of bad errors.

This bug is branched from PR58057.

in that bug a file such as this:
---------------------------------------------------------------------------
...
extern"C"void*blah_4(void*);    //error: expected unqualified-id before
user-defined string literal

extern"\x43"void*blah_5(void*);      //error: expected unqualified-id before
user-defined string literal

int main() {}
---------------------------------------------------------------------------

gives errors like this:
blah.cpp:12:7: error: expected unqualified-id before ‘STRING_USERDEF’ token
 extern"C"void*blah_4(void*);    //error: expected unqualified-id before
user-defined string literal
       ^
blah.cpp:14:7: error: expected unqualified-id before ‘STRING_USERDEF’ token
 extern"\x43"void*blah_5(void*);      //error: expected unqualified-id before
user-defined string literal

Referring to internal tokens is not helpful to users.
Let's fix this.

Reply via email to