[GCC-XML] GCCXML chokes on <complex>

Brad King brad.king at kitware.com
Mon May 17 13:07:41 EDT 2010


Steve M. Robbins wrote:
>   # 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 GCC 4.2 parser used by gccxml internally does not support
"inline namespace".  It is easy to reproduce with gcc 4.2 proper:

 $ echo 'inline namespace xyz {}' > foo.cxx
 $ g++-4.2 foo.cxx
 foo.cxx:1: error: expected unqualified-id before ‘namespace’

Here is a paper describing "inline namespace":

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm

I don't know if that is the most recent or not.

I think the answer is to tweak the header to turn

  inline namespace __gnu_cxx_ldbl128 { ... }

into just the inside part:

  ...

It may have to be done everywhere that namespace declaration
appears.

-Brad


More information about the gccxml mailing list