aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.dg/cpp/trad/assert2.c
blob: 4aa0b99447967beb12bc543d9c6980ca143ccbbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Malformed assertion tests.  */
/* { dg-do preprocess } */
/* { dg-options "-Wno-deprecated" } */

#assert		/* { dg-error "without predicate" "assert w/o predicate" } */
#assert %	/* { dg-error "an identifier" "assert punctuation" } */
#assert 12	/* { dg-error "an identifier" "assert number" } */
#assert abc	/* { dg-error "missing" "assert w/o answer" } */

#if #		/* { dg-error "without predicate" "test w/o predicate" } */
#endif

#if #%		/* { dg-error "an identifier" "test punctuation" } */
#endif

#if #12		/* { dg-error "an identifier" "test number" } */
#endif

#if #abc
#error		/* { dg-bogus "error" "test w/o answer" } */
#endif

#if #abc[def]	/* { dg-error "not valid in" "bad syntax" } */
#endif