Mercurial > ~dholland > hg > tradcpp > index.cgi
annotate tests/t24.c @ 203:3a25180d3a5c
Abort on line numbering or column numbering overflow.
Line numbers are limited to values that fit in "unsigned int". Also
reject input lines longer than 2^32-1 characters. It seems reasonable
to presume that any input that violates these constraints is someone
screwing around and not a serious attempt to compile or preprocess
anything useful. Done in response to n2129, but without getting into
any of the silliness found there.
author | David A. Holland |
---|---|
date | Tue, 01 Aug 2017 14:51:04 -0400 |
parents | de18d1ac7d34 |
children |
rev | line source |
---|---|
94 | 1 #if 0 |
2 wrong | |
3 #endif | |
4 | |
5 #if 1 | |
6 right | |
7 #endif | |
8 | |
9 #if -1 | |
10 right | |
11 #endif | |
12 | |
13 #if 0 + 0 | |
14 wrong | |
15 #endif | |
16 | |
17 #if 1 + 1 | |
18 right | |
19 #endif | |
20 | |
21 #if 1 - 1 | |
22 wrong | |
23 #endif | |
24 | |
25 #if -1 + 1 | |
26 wrong | |
27 #endif | |
28 | |
29 #if 3 - 2 - 1 | |
30 wrong | |
31 #endif | |
32 | |
33 #if 3 * 2 - 6 | |
34 wrong | |
35 #endif | |
36 | |
37 #if 6 - 2 * 3 | |
38 wrong | |
39 #endif | |
40 | |
41 #if 3 - 3 && 1 | |
42 wrong | |
43 #endif | |
44 | |
45 #if 3 - 3 || 0 | |
46 wrong | |
47 #endif | |
48 | |
49 #if 1 && 0 | |
50 wrong | |
51 #endif | |
52 | |
53 #if 0 && 1 | |
54 wrong | |
55 #endif | |
56 | |
57 #if 1 || 0 | |
58 right | |
59 #endif | |
60 | |
61 #if 0 || 1 | |
62 right | |
63 #endif | |
64 | |
65 #if (0 || 1) && (0 || 0) | |
66 wrong | |
67 #endif |