annotate gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=traditional -Wno-deprecated -Wno-long-long" }
kono
parents:
diff changeset
3 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
kono
parents:
diff changeset
4 #assert x(x) // { dg-error "suggest hiding #assert from traditional C with an indented # .-Werror=traditional." }
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 #define X X // { dg-error "traditional C ignores #define with the # indented .-Werror=traditional." }
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 #if 0
kono
parents:
diff changeset
9 #elif 1 // { dg-error "suggest not using #elif in traditional C .-Werror=traditional." }
kono
parents:
diff changeset
10 #endif
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 #define f(X) X
kono
parents:
diff changeset
13 int f; // { dg-error "function-like macro \"f\" must be used with arguments in traditional C .-Werror=traditional." }
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 #if 0U // { dg-error "traditional C rejects the \"U\" suffix .-Werror=traditional." }
kono
parents:
diff changeset
16 #endif
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 #if +1 // { dg-error " traditional C rejects the unary plus operator .-Werror=traditional." }
kono
parents:
diff changeset
19 #endif
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 char *x = "\x0"; // { dg-error "the meaning of '.x' is different in traditional C .-Werror=traditional." }
kono
parents:
diff changeset
22 char *y = "\a"; // { dg-error "the meaning of '.a' is different in traditional C .-Werror=traditional." }
kono
parents:
diff changeset
23 char *z = "\u0F43"; // { dg-error "the meaning of '.u' is different in traditional C .-Werror=traditional." }