[PATCH] fix wide character literal use in some test cases

Jan Beulich JBeulich@novell.com
Fri Jan 6 14:34:00 GMT 2006


>>> Paolo Carlini <pcarlini@suse.de> 06.01.06 15:05:50 >>>
>Jan Beulich wrote:
>
>>This abstracts the use of constants for calls to wmemset() in some
of
>>the test cases. On targets with 16-bit wide characters or with
>>-fshort-wchar using 32-bit literals results in compiler warnings,
respectively
>>leading to failures of these tests.
>>  
>>
>Humm, I have a feeling we can deal with this issue better, in
particular
>avoiding duplicating "C style" macros. Since there is nothing special
>about 0xdeadbeef in such tests, what about just using 0xdead
everywhere
>and adding a one-line comment reminding the 16-bit wchar_t issue?

This was my first take, too. However, I wondered whether filling half
of the space (for 32-bit wide chars) with zeroes wouldn't change
behavior; after all the purpose of these memset()-s appears to be to put
garbage in the whole memory range.

Jan



More information about the Gcc-patches mailing list