diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-11-10 20:14:41 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-11-10 20:14:41 +0000 |
commit | 13c216556de997e8bda737d18a41ebe61bce1d79 (patch) | |
tree | a319274155607b59e6fd0d9bad41edc6a68b2038 /gcc/testsuite/c-c++-common/Wshift-count-negative-2.c | |
parent | de2b09ec2fac5fbbc0490f2768237f97261361ce (diff) | |
download | gcc-13c216556de997e8bda737d18a41ebe61bce1d79.zip gcc-13c216556de997e8bda737d18a41ebe61bce1d79.tar.gz gcc-13c216556de997e8bda737d18a41ebe61bce1d79.tar.bz2 |
invoke.texi ([-Wshift-count-negative, [...]): Add.
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* doc/invoke.texi ([-Wshift-count-negative, -Wshift-count-overflow]):
Add.
/c-family
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
/cp
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
OPT_Wshift_count_overflow in the warnings.
/c
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
OPT_Wshift_count_overflow in the warnings.
/testsuite
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* c-c++-common/Wshift-count-overflow-1.c: New.
* c-c++-common/Wshift-count-overflow-2.c: Likewise.
* c-c++-common/Wshift-count-negative-1.c: Likewise.
* c-c++-common/Wshift-count-negative-2.c: Likewise.
From-SVN: r217313
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wshift-count-negative-2.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/Wshift-count-negative-2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wshift-count-negative-2.c b/gcc/testsuite/c-c++-common/Wshift-count-negative-2.c new file mode 100644 index 0000000..91c7129 --- /dev/null +++ b/gcc/testsuite/c-c++-common/Wshift-count-negative-2.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Wno-shift-count-negative" } */ + +void foo() +{ + unsigned i1 = 1U << -1; + unsigned i2 = 1U >> -1; +} |