From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6512 invoked by alias); 23 Sep 2013 08:10:01 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6460 invoked by uid 48); 23 Sep 2013 08:09:56 -0000 From: "gcc-bug at sogetthis dot com" To: gcc-bugs@gcc.gnu.org Subject: [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 Date: Mon, 23 Sep 2013 08:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.6.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc-bug at sogetthis dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cf_gcchost cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg01626.txt.bz2 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;