diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-05-01 04:27:15 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-05-01 04:27:15 +0000 |
commit | 71834ad346a514c1ef41342403b762503e5ce05e (patch) | |
tree | e7d7d2ba340760ae4cb7b524b8aab06e994b8769 /gcc/testsuite/gcc.dg/Woverflow-3.c | |
parent | 1c56bc4a7ea665c876311f1df1658aa19107f93f (diff) | |
download | gcc-71834ad346a514c1ef41342403b762503e5ce05e.zip gcc-71834ad346a514c1ef41342403b762503e5ce05e.tar.gz gcc-71834ad346a514c1ef41342403b762503e5ce05e.tar.bz2 |
common.opt (Woverflow): New command line option.
* common.opt (Woverflow): New command line option.
* c-common.c (constant_expression_warning): Check warn_overflow.
(overflow_waring): Pass OPT_Woverflow to warning.
(unsigned_conversion_warning): Likewise.
(convert_and_check): Likewise.
* doc/invoke.texi: Document new command line option.
* gcc.dg/Woverflow-1.c: New test case.
* gcc.dg/Woverflow-2.c: Likewise.
* gcc.dg/Woverflow-3.c: Likewise.
From-SVN: r113408
Diffstat (limited to 'gcc/testsuite/gcc.dg/Woverflow-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/Woverflow-3.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Woverflow-3.c b/gcc/testsuite/gcc.dg/Woverflow-3.c new file mode 100644 index 0000000..73a021b --- /dev/null +++ b/gcc/testsuite/gcc.dg/Woverflow-3.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wno-overflow" } */ + +#include <limits.h> + +int foo = INT_MAX + 1; + |