Can somebody explain this?

Ramadass, Ramanathan Ramanathan.Ramadass@spirentcom.com
Fri Nov 7 02:29:00 GMT 2003


Hi,

For my project i built a gcc-3.3.2 cross-compiler for the i386-elf target and use a third party's standard C & C++ libraries. While testing it out with a simple C++ "Hello World" example, i got the following error;

`operator new' takes type `size_t' (`long unsigned int') as first parameter.

My include paths are correct. After some head-scratching, i replaced the "size_t" type with its actual typedef value(as defined in the library) i.e. "unsigned long" and got around the error. But i do not understand why the error line shows 'size_t' as 'long unsigned int'. Some browsing on the web showed that many people also had come across that error, but i found no real explanation. 

Can somebody explain?

Thanks
Ram

Ramanathan Ramadass
Sr. Software Engineer,
Performance Analysis - Broadband,
Spirent Communications, 
Voice: 408-752-7310
Fax: 408-752-7186
mailto:ramanathan.ramadass@spirentcom.com
http://www.spirentcom.com







More information about the Gcc-help mailing list