[Bug c++/57757] CPP extra inserted whitespace needs to be reviewed for C++11 user-defined literals
harald at gigawatt dot nl
gcc-bugzilla@gcc.gnu.org
Sat Jun 29 15:34:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57757
--- Comment #3 from Harald van Dijk <harald at gigawatt dot nl> ---
Updated testcase, tested with :
#define ID(x) x
extern ID("C")void exit(int);
int main() { exit(0); }
This should be accepted, and is, except when -save-temps is used:
$ ~/gcc-run/bin/g++ -std=c++11 -c test.cc
$ ~/gcc-run/bin/g++ -std=c++11 -save-temps -c test.cc
test.cc:2:8: error: expected unqualified-id before ‘STRING_USERDEF’ token
extern ID("C")void exit(int);
^
test.cc: In function ‘int main()’:
test.cc:3:20: error: ‘exit’ was not declared in this scope
int main() { exit(0); }
^
$ ~/gcc-run/bin/g++ --version
g++ (GCC) 4.9.0 20130629 (experimental)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Using sources from git mirror, commit 801070f5acc11e86fd587b583ebe2ce900ab7a5d,
corresponding to svn rev 200565.
More information about the Gcc-bugs
mailing list