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++/58072] New: [C++11] Error messages involving user-defined literals are poor (refer to tokens)


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.

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