[PATCH] Revision 3: utf-16 and utf-32 support in C and C++
Danny Smith
dansmister@gmail.com
Mon May 5 23:03:00 GMT 2008
> >
> > This can be avoided by only testing the line on targets with at least
> > 4-byte wchar_t, eg
> >
> > #if (__SIZEOF_WCHAR_T >= 4)
> > char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" } */
> > #endif
>
> > Is that the right thing to do?
>
> That won't work, the testsuite framework won't recognize that
> the line with the warning is not processed and will still look
> for the warning. The test would also need to skip the dg-warning
> directive by adding "{ target xxx }", where xxx is a new
> effective-target keyword for a target whose wchar_t is at least
> four bytes.
>
Thanks for the advice. How is this (attached)?
2008-05-06 Danny Smith <dannysmith@users.sourceforge.net>
* lib/target_supports.exp (check_effective_target_4byte_wchar_t):
New proc.
* gcc.dg/utf16-4.c: Use it.
* gcc.dg/utf32-4.c: Use it.
* g++.dg/ext/utf16-4.C: Use it.
* gcc.dg/ext/utf32-4.C: Use it.
Danny
> Janis
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4byte_wchar_t.diff
Type: text/x-diff
Size: 2752 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080505/15534268/attachment.bin>
More information about the Gcc-patches
mailing list