diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-04-25 19:46:03 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2009-04-25 19:46:03 +0100 |
commit | f88d07724fad4b84d8e73ff30b6f3c16cd832ef3 (patch) | |
tree | a0a78183eae0cbfd3a9ea596201c0a1fd30642d9 /gcc/testsuite/gcc.dg | |
parent | a3710436b62ad4c025de1b3b5a97e6d3eb820edf (diff) | |
download | gcc-f88d07724fad4b84d8e73ff30b6f3c16cd832ef3.zip gcc-f88d07724fad4b84d8e73ff30b6f3c16cd832ef3.tar.gz gcc-f88d07724fad4b84d8e73ff30b6f3c16cd832ef3.tar.bz2 |
re PR preprocessor/39559 (constants too large for intmax_t need pedwarns)
libcpp:
PR preprocessor/39559
* expr.c (cpp_interpret_integer): Use a pedwarn for decimal
constants larger than intmax_t in C99 mode.
gcc/testsuite:
* gcc.dg/c99-intconst-2.c: New test.
From-SVN: r146777
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-intconst-2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c99-intconst-2.c b/gcc/testsuite/gcc.dg/c99-intconst-2.c new file mode 100644 index 0000000..3492367 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-intconst-2.c @@ -0,0 +1,8 @@ +/* Test for integer constant types: diagnostics for constants outside + range of intmax_t must be pedwarns. PR 39559. */ +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ + +#if 9223372036854775808LL /* { dg-error "integer constant is so large that it is unsigned" } */ +unsigned long long l = 9223372036854775808LL; /* { dg-error "integer constant is so large that it is unsigned" } */ +#endif |