This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] utf-16 and utf-32 support in C and C++


On Thu, 13 Mar 2008, Kris Van Hees wrote:

> Here you go.  Sorry about that.
> 
> Index: gcc/testsuite/gcc.dg/utf32-2.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/utf32-2.c	(revision 0)
> +++ gcc/testsuite/gcc.dg/utf32-2.c	(revision 0)
> @@ -0,0 +1,30 @@
> +/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
> +/* Test the support for char32_t* string constants. */
> +/* { dg-do run } */
> +/* { dg-options "-std=c99 -Wall -Werror" } */

A TR Type 2 is neither a standard nor an amendment to a standard (the same 
also applies to Type 1 and Type 3 TRs, but this is a Type 2 TR).  Thus, 
the new syntax *must not* be accepted in C99 or C90 or C++98 mode, and 
there must be testcases to verify that it is not accepted in those modes.  
It must only be accepted in gnu89 / gnu99 / ... extension modes, or in 
c++0x mode (or with a special option to enable support for the new syntax 
in older standard modes if absolutely necessary).  In the modes for 
existing C and C++ standards, U or u must be lexed as separate tokens from 
a following string (they could be macros, so valid code could have its 
semantics affected; the testcases should probably involve u and U as 
macros).

-- 
Joseph S. Myers
joseph@codesourcery.com


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