annotate gcc/testsuite/gcc.dg/cpp/undef2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* C99 6.10.8 para 4: None of [the predefined macro names] shall be
kono
parents:
diff changeset
2 the subject of a #define or an #undef preprocessing directive. */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 /* { dg-do preprocess } */
kono
parents:
diff changeset
5
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
6 #undef __DATE__ /* { dg-warning "-:undefining \"__DATE__\"" } */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
7 #undef __TIME__ /* { dg-warning "-:undefining \"__TIME__\"" } */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
8 #undef __FILE__ /* { dg-warning "-:undefining \"__FILE__\"" } */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
9 #undef __LINE__ /* { dg-warning "undefining \"__LINE__\"" } */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
10 #undef __STDC__ /* { dg-warning "undefining \"__STDC__\"" } */
111
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 /* These should be protected from #undef, but aren't, because they
kono
parents:
diff changeset
13 are set with normal #define commands - and on top of that, some
kono
parents:
diff changeset
14 of them are library properties, outside our control. To consider:
kono
parents:
diff changeset
15 warn about undefining/redefining any identifier beginning with
kono
parents:
diff changeset
16 __STDC_ .
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 __STDC_HOSTED__
kono
parents:
diff changeset
19 __STDC_VERSION__
kono
parents:
diff changeset
20 __STDC_IEC_559__
kono
parents:
diff changeset
21 __STDC_IEC_559_COMPLEX__
kono
parents:
diff changeset
22 __STDC_ISO_10646__
kono
parents:
diff changeset
23 */