cpplib and endianness problems

Neil Booth neil@daikokuya.demon.co.uk
Tue Jan 9 16:05:00 GMT 2001


Dave Brolley wrote:-

> > #if L'\xfeed' != 0xfeed
> > #error 0xfeed	/* { dg-bogus "error" "wide charconst recognition 2" } */
> > #endif
> 
> The escape sequence, \xfeed represents one character of type wchar_t. 
> This character is then converted to type 'int'. So the answer depends on 
> the size of wchat_t and whether it is signed or not.

Hi Dave,

Sorry to take so long to get back to you on this.

wchar_t should be >= 16 bits everywhere, right?  Similarly for int.
Certainly on Solaris.  I don't see why the test fails.

Is there a generally correct form for the above test?  I'm a little
confused.

Neil.


More information about the Gcc mailing list