This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpplib and endianness problems


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]