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 preprocessor/62086] New: A bug with option -fextended-identifiers


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62086

            Bug ID: 62086
           Summary: A bug with option -fextended-identifiers
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pangbw at gmail dot com

For this simple code, it would compile without -fextended-identifiers but fail
with it:

$cat ~/x.c
int main()
{
#if 0
  int \u00A8\u00AA\u00AD\u00AF\u00B2\u00B5 = 7;
#endif
}
$ gcc -c ~/x.c
$ gcc -c -fextended-identifiers ~/x.c
x.c: In function âmainâ:
x.c:4:7: warning: universal character names are only valid in C++ and C99
[enabled by default]
x.c:4:7: error: universal character \u00A8 is not valid in an identifier
x.c:4:7: warning: universal character names are only valid in C++ and C99
[enabled by default]
x.c:4:7: warning: universal character names are only valid in C++ and C99
[enabled by default]
x.c:4:7: error: universal character \u00AD is not valid in an identifier
x.c:4:7: warning: universal character names are only valid in C++ and C99
[enabled by default]
x.c:4:7: error: universal character \u00AF is not valid in an identifier
x.c:4:7: warning: universal character names are only valid in C++ and C99
[enabled by default]
x.c:4:7: error: universal character \u00B2 is not valid in an identifier
x.c:4:7: warning: universal character names are only valid in C++ and C99
[enabled by default]

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