[GCC-XML] opteron, operator new(unsigned int)

Brad King brad.king at kitware.com
Thu Jul 21 16:25:00 EDT 2005


David Pare wrote:
> I ran the preprocessor as you suggested.
> 
> The very first mention of "operator new" in the preprocessed output is 
> actually the one that's causing the error.  In my input, I see at line 
> #84 in /usr/include/c++/4.0.0/new, the following line:
>    void* operator new(std::size_t) throw (std::bad_alloc)
> 
> And that's exactly where the first gccxml error is being reported.
> 
> It appears to me that somehow, built into gccxml, operator new is 
> hardcoded as being defined as operator new(unsigned int) and so when the 
> <new> include file is loaded, gccxml complains that <new> is doing a bad 
> thing by changing its definition to a size_t.
> 
> Here's the actual error message from gccxml:
> 
> In file included from /usr/include/c++/4.0.0/ext/mt_allocator.h:37,
>                  from 
> /usr/include/c++/4.0.0/x86_64-redhat-linux/bits/c++allocator.h:34,
>                  from /usr/include/c++/4.0.0/bits/allocator.h:52,
>                  from /usr/include/c++/4.0.0/memory:54,
>                  from /usr/include/c++/4.0.0/string:47,
>                  from ../web++/webLog.h:39,
>                  from ../web++/webAcceptor.h:13:
> /usr/include/c++/4.0.0/new:84: error: `operator new' takes type `size_t' (`
>    unsigned int') as first parameter

I thought I fixed that already.  What version of gccxml are you using?

-Brad



More information about the gccxml mailing list