annotate gcc/testsuite/gcc.dg/cpp/trad/assert2.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 /* Malformed assertion tests. */
kono
parents:
diff changeset
2 /* { dg-do preprocess } */
kono
parents:
diff changeset
3 /* { dg-options "-Wno-deprecated" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 #assert /* { dg-error "without predicate" "assert w/o predicate" } */
kono
parents:
diff changeset
6 #assert % /* { dg-error "an identifier" "assert punctuation" } */
kono
parents:
diff changeset
7 #assert 12 /* { dg-error "an identifier" "assert number" } */
kono
parents:
diff changeset
8 #assert abc /* { dg-error "missing" "assert w/o answer" } */
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 #if # /* { dg-error "without predicate" "test w/o predicate" } */
kono
parents:
diff changeset
11 #endif
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 #if #% /* { dg-error "an identifier" "test punctuation" } */
kono
parents:
diff changeset
14 #endif
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 #if #12 /* { dg-error "an identifier" "test number" } */
kono
parents:
diff changeset
17 #endif
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 #if #abc
kono
parents:
diff changeset
20 #error /* { dg-bogus "error" "test w/o answer" } */
kono
parents:
diff changeset
21 #endif
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 #if #abc[def] /* { dg-error "not valid in" "bad syntax" } */
kono
parents:
diff changeset
24 #endif