Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/cpp/ucnid-7-utf8.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-std=c99" } */ /* When GCC reads UTF-8-encoded input into its internal UTF-8 representation, it does not apply any transformation to the data, and in particular it makes no attempt to verify that the encoding is valid UTF-8. Historically, if any non-ASCII characters were found outside a string or comment, they were treated as stray tokens and did not necessarily produce an error, e.g. if, as in this test, they disappear in the preprocessor. Now that UTF-8 is also supported in identifiers, the basic structure of this process has not changed; GCC just treats invalid UTF-8 as a stray token. This test verifies that the historical behavior is unchanged. In the future, if GCC were changed, say, to validate the UTF-8 on input, then this test would no longer be appropriate. */ #define a b( #define b(x) q /* The line below contains invalid UTF-8. */ int aĻ);