diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-07-23 00:25:18 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-07-23 00:25:18 +0000 |
commit | 088d39afc6c4fbaadb25fc31e733de2ce4422cab (patch) | |
tree | 79524a848da90b6f5c83a591c4bfeddc3eb888e4 /clang/test/Lexer/constants.c | |
parent | 9974c88f7697a569ade90f7b136a2d07e98d9fe0 (diff) | |
download | bcm5719-llvm-088d39afc6c4fbaadb25fc31e733de2ce4422cab.tar.gz bcm5719-llvm-088d39afc6c4fbaadb25fc31e733de2ce4422cab.zip |
Integers which are too large should be an error.
Switch some warnings over to errors which should never have been warnings
in the first place. (Also, a minor fix to the preprocessor rules for
integer literals while I'm here.)
llvm-svn: 186903
Diffstat (limited to 'clang/test/Lexer/constants.c')
-rw-r--r-- | clang/test/Lexer/constants.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Lexer/constants.c b/clang/test/Lexer/constants.c index 290388543c0..c1fb54df42d 100644 --- a/clang/test/Lexer/constants.c +++ b/clang/test/Lexer/constants.c @@ -13,7 +13,12 @@ float Y = 08.123456; // PR2252 #if -0x8000000000000000 // should not warn. #endif - +#if -01000000000000000000000 // should not warn. +#endif +#if 9223372036854775808 // expected-error {{integer constant is larger than the largest signed integer type}} +#endif +#if 0x10000000000000000 // expected-error {{integer constant is larger than the largest unsigned integer type}} +#endif int c[] = { 'df', // expected-warning {{multi-character character constant}} |