(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
cpp/
ucnid-7-utf8.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-std=c99" } */
       3  
       4  /* When GCC reads UTF-8-encoded input into its internal UTF-8
       5  representation, it does not apply any transformation to the data, and
       6  in particular it makes no attempt to verify that the encoding is valid
       7  UTF-8.  Historically, if any non-ASCII characters were found outside a
       8  string or comment, they were treated as stray tokens and did not
       9  necessarily produce an error, e.g. if, as in this test, they disappear
      10  in the preprocessor.  Now that UTF-8 is also supported in identifiers,
      11  the basic structure of this process has not changed; GCC just treats
      12  invalid UTF-8 as a stray token.  This test verifies that the historical
      13  behavior is unchanged.  In the future, if GCC were changed, say, to
      14  validate the UTF-8 on input, then this test would no longer be
      15  appropriate.  */
      16  
      17  
      18  #define a b(
      19  #define b(x) q
      20  /* The line below contains invalid UTF-8.  */
      21  int a�);