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

* [Bug c++/58506] 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 [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 ` gcc-bug at sogetthis dot com
  2013-09-23  8:31 ` [Bug preprocessor/58506] " redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gcc-bug at sogetthis dot com @ 2013-09-23  8:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58506

--- Comment #1 from gcc-bug at sogetthis dot com ---
Created attachment 30883
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30883&action=edit
Reproduction test case.


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

* [Bug preprocessor/58506] 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 [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 ` redi at gcc dot gnu.org
  2013-09-23  8:32 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-09-23  8:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58506

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Already fixed on the 4.6 branch:
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=188250


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

* [Bug preprocessor/58506] 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 [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
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-09-23  8:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58506

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.6.4

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
That change is in the 4.6.4 release, and the 4.6 branch is closed and
unmaintained anyway.


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

* [Bug preprocessor/58506] 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 [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
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-09-23  8:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58506

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.6 is no longer supported, you are clearly missing the
r178258 fix, but even that has been backported to the 4.6 branch in r188250
quite some time before it's support has been stopped.


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

* [Bug preprocessor/58506] 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 [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
                   ` (3 preceding siblings ...)
  2013-09-23  8:38 ` jakub at gcc dot gnu.org
@ 2013-09-23  9:03 ` gcc-bug at sogetthis dot com
  4 siblings, 0 replies; 6+ messages in thread
From: gcc-bug at sogetthis dot com @ 2013-09-23  9:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58506

--- Comment #5 from gcc-bug at sogetthis dot com ---
OK. Sorry for reporting a known (and resolved) problem. The change looks good.
Thank you for your time. Sorry for the inconvenience. (You guys are really
quick BTW:-).


^ 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).