comparison gcc/testsuite/gcc.dg/cpp/ucnid-11-utf8.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Test spelling differences in UCNs are properly diagnosed for macro
2 redefinitions. */
3 /* { dg-do preprocess } */
4 /* { dg-options "-std=c99 -pedantic-errors" } */
5
6 /* Different spelling of UCN in expansion. */
7 #define m1 \u00c1 /* { dg-message "-:previous definition" } */
8 #define m1 Á /* { dg-error "-:redefined" } */
9
10 #define m1ok Á
11 #define m1ok Á
12
13 /* Different spelling of UCN in argument name. */
14 #define m2(\u00c1) /* { dg-message "-:previous definition" } */
15 #define m2(Á) /* { dg-error "-:redefined" } */
16
17 #define m2ok(Á)
18 #define m2ok(Á)
19
20 /* Same spelling in argument name but different spelling when used in
21 expansion. */
22 #define m3(\u00c1) \u00c1 /* { dg-message "-:previous definition" } */
23 #define m3(\u00c1) Á /* { dg-error "-:redefined" } */
24
25 #define m3ok(\u00c1) Á
26 #define m3ok(\u00c1) Á
27
28 /* Different spelling of the macro name itself is OK. */
29 #define m4ok\u00c1
30 #define m4okÁ