stddef.h, cstddef, and ptrdiff_t

Shaun Jackman sjackman@pathwayconnect.com
Thu Jun 26 16:42:00 GMT 2003


I'm trying to compile gcc-3.2 for arm-wince-pe using gcc-3.2.2 from
Redhat. The build fails while building libstdc++.

/home/sjackman/work/pocketpc/libstdc++/build/include/cstddef:51: conflicting
   types for `typedef long int ptrdiff_t'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h:151: previous
   declaration as `typedef int ptrdiff_t'

stddef.h defines ptrdiff_t as long int, and cstddef defines it as long.
I didn't think these types were incompatible, but they seem to be. How
should I fix this?

Thanks,
Shaun




More information about the Gcc mailing list