http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58506
Bug ID: 58506 Summary: gcc -E -C gives error: pasting "__gthrw_" and "/* Android's C library does not provide pthread_cancel, check for "pthread_create' instead. */" does not give a valid preprocessing token Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bug at sogetthis dot com Host: x86_64-linux-gnu Target: x86_64-linux-gnu Running with gcc -E -C gives the following In file included from /usr/include/c++/4.6/x86_64-linux-gnu/32/bits/gthr.h:170:0, from /usr/include/c++/4.6/ext/atomicity.h:34, from /usr/include/c++/4.6/bits/basic_string.h:41, from /usr/include/c++/4.6/string:54, from /opt/buildagent/workspace/p4testtics/code/Framework/Common/Logging/Interface/TTLog.h:9, from /opt/buildagent/workspace/p4testtics/code/Framework/Common/Container/Implementation/AllocatorArray.cpp:1: /usr/include/c++/4.6/x86_64-linux-gnu/32/bits/gthr-default.h:251:1: error: pasting "__gthrw_" and "/* Android's C library does not provide pthread_cancel, check for "pthread_create' instead. */" does not give a valid preprocessing token Running without the -C flag (gcc -E) works fine. The macro invocation can be found in http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00892_source.html lines 243-251 and the macro definition in http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00892_source.html line 75. I have reproduced the problem with gcc 4.3.2 on another (GNU/Linux x86_64) machine (see attached data). This contains some context (uname -a, gcc -v), a self-contained source file (invalidpastetoken.c) and the resuls of 'gcc -E -C invalidpastetoken.c' and 'gcc -E invalidpastetoken.c'. The correct result gives the token __gthrw_pthread_cancel; The incorrect result gives __gthrw_ /* Android's C library does not provide pthread_cancel, check for * 00245 `pthread_create' instead. */ pthread_cancel;