[GCC-XML] GCCXML chokes on <complex>

Steve M. Robbins steve at sumost.ca
Wed Jun 2 23:44:29 EDT 2010


Hi Brad,

Thanks for the hint.

On Mon, May 17, 2010 at 01:07:41PM -0400, Brad King wrote:

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

Hmm.  So the "inline namespaces" all appear to happen in c++config.h,
which I found on the alpha in

  /usr/include/c++/4.4/alpha-linux-gnu/bits/c++config.h

Given the pathname, I assume there are arch-specific bits in there.
Indeed, the file differs between alpha and x86_64.  However, I found
that I had to put it into GCC/4.4/bits/c++config.h -- and NOT
GCC/4.4/alpha-linux-gnu/bits/c++config.h to get gccxml to find it.
It's not clear to me how to do this tweaking in an architecture-specific
manner.

Anway, I did it by hand on alpha and the compile now fails elsewhere:

In file included from /usr/include/c++/4.4/bits/locale_facets.h:2599,
                 from /usr/include/c++/4.4/bits/basic_ios.h:39,
                 from /usr/include/c++/4.4/ios:45,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from complex.cc:1:
/usr/include/c++/4.4/bits/locale_facets.tcc:1279: error: explicit instantiation of non-template 'const int std::num_put'
/usr/include/c++/4.4/bits/locale_facets.tcc:1279: error: expected `;' before '<' token
.... plus plenty more similar ...

The line in question contains this:

  extern template
    const num_put<char>&
    use_facet<num_put<char> >(const locale&);

I'm stumped again.  The output from gccxml -E complex.cc contains this

namespace __gnu_cxx_ldbl128 {
  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
    class num_get;
  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
    class num_put;
}

I'm not sure why locale_facets is looking for std::num_put but
it is really in namespace __gnu_cxx_ldbl128.  Any 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/20100602/641a34a0/attachment.sig>


More information about the gccxml mailing list