public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58506] New: 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
@ 2013-09-23  8:10 gcc-bug at sogetthis dot com
  2013-09-23  8:12 ` [Bug c++/58506] " gcc-bug at sogetthis dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gcc-bug at sogetthis dot com @ 2013-09-23  8:10 UTC (permalink / raw)
  To: gcc-bugs

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;


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-23  9:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-23  8:10 [Bug c++/58506] New: 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 gcc-bug at sogetthis dot com
2013-09-23  8:12 ` [Bug c++/58506] " gcc-bug at sogetthis dot com
2013-09-23  8:31 ` [Bug preprocessor/58506] " redi at gcc dot gnu.org
2013-09-23  8:32 ` redi at gcc dot gnu.org
2013-09-23  8:38 ` jakub at gcc dot gnu.org
2013-09-23  9:03 ` gcc-bug at sogetthis dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).