[GCC-XML] problem with gcc 3.4.6

Stefan Roiser stefan.roiser at cern.ch
Wed Aug 13 06:34:52 EDT 2008

Hi Brad,

On 12 Aug 2008, at 18:45, Brad King wrote:

> Stefan Roiser wrote:
>> No when invoking gccxml_cc1plus with -undef __GXX_WEAK__ does not  
>> appear
>> anymore. On the other hand when I invoke gccxml with --debug I see it
>> appear again explicitly.
> [snip]
>> Using the following arguments to GCC-XML executable:
> ...
>>  "-undef"
> ...
>>  "-D__GXX_WEAK__=1"
> This means that it *is* coming from the native compiler's list of
> definitions.  In this test you reported:
> echo | /usr/bin/c++ -E -dD - | grep GXX_WEAK
> try adding "-x c++" to the options to make sure it treats the
> translation unit as c++.

right, with "-x c++" the macro appears, I always thought that c++  
forces c++ :-) So I have compared the macros from the system compiler  
and the gccxml passed ones, they are exactly the same (except the bit  
about the modified builins.h).

Looking a bit further I see that other people have a similar problem  
when cross compiling using a gcc >= 4.2. My next try is now to use a  
modified gccxml-0.9/GCC/3.4/bits/gthr-default.h with the diff below,  
this seems to work. Would this be OK?

<   extern __typeof(name) __gthrw_ ## name __attribute__  
 >   extern __typeof(name) __gthrw_ ## name



PS: I also attach the full header.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gthr-default.h
Type: application/octet-stream
Size: 18103 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20080813/7c54dbb3/attachment-0002.obj>
-------------- next part --------------

Stefan Roiser, CERN, PH Department, CH-1211 Geneva 23
tel:+41 22 76 74838, cell: +41 76 48 75334, fax:+41 22 76 69119

More information about the gccxml mailing list