[GCC-XML] GCCXML chokes on <complex>
Steve M. Robbins
steve at sumost.ca
Mon May 17 02:13:55 EDT 2010
On Thu, May 13, 2010 at 11:28:19AM -0400, Brad King wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Steve M. Robbins wrote:
> > /usr/include/c++/4.4/alpha-linux-gnu/bits/c++config.h:214: error: expected unqualified-id before 'namespace'
> [snip]
> > I tried compiling a simple program:
> >
> > #include <complex>
> >
> > int main(int ac, char* av[])
> > {
> > return 0;
> > }
> >
> > With gcc, it compiles on alpha. Using gccxml, I get the same error as shown above.
> > Does gccxml need a tweak to handle this?
>
> It would seem so. You can use "gccxml -E" to preprocess the test
> source and compare it to what "gcc -E" produces for the offending
> spot. Note that gccxml uses a patched GCC 4.2 parser internally
> so sometimes it has trouble with headers from newer GCC versions.
> The solution we use is to put tweaked versions of the offending
> headers in "GCC_XML/Support/GCC/4.4" or other support directories.
OK, I did run "gccxml -E" and "gcc -E". I can't figure what tweaks
need to be made.
Here's what "gcc -E" displays for the problematic line 214 of c++config.h:
# 42 "/usr/include/c++/4.4/complex" 3
# 1 "/usr/include/c++/4.4/alpha-linux-gnu/bits/c++config.h" 1 3
# 212 "/usr/include/c++/4.4/alpha-linux-gnu/bits/c++config.h" 3
namespace std
{
inline namespace __gnu_cxx_ldbl128 { }
}
And "gccxml -E" displays the same thing. The difference is that
there's a bunch of stuff (mainly declarations of functions named
__builtin_foo) from "/usr/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h"
appearing before this.
Anyone have ideas?
Thanks,
-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20100517/66df51f3/attachment.sig>
More information about the gccxml
mailing list