diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-30 17:57:52 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-30 17:57:52 +0000 |
commit | f2a4bf4bee47afb2de33f569f6b4659586d2b1ce (patch) | |
tree | e8e076a4c9e72a422daa088fceae71a05cbc16f3 /regress | |
parent | 81a87170477ba97469f8b58ad71f0b493fbf98de (diff) |
compare of constants outside type range
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/pcc/cc/ccom/const001.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/usr.bin/pcc/cc/ccom/const001.c b/regress/usr.bin/pcc/cc/ccom/const001.c new file mode 100644 index 00000000000..5bb68f6e1c5 --- /dev/null +++ b/regress/usr.bin/pcc/cc/ccom/const001.c @@ -0,0 +1,23 @@ +main() +{ + char c = 0x7f; + short s = 0x7fff; + int i = 0x7fffffff; + long long ll = 0x7fffffffffffffffLL; + + if (c > i) + exit(1); + if (s > i) + exit(1); + if (i > ll) + exit(1); + + if (c > 0x7fff) + exit(1); + if (s > 0x7fffffff) + exit(1); + if (i > 0x7fffffffffffffffLL) + exit(1); + exit(0); +} + |