diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wshift-count-overflow-2.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/Wshift-count-overflow-2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wshift-count-overflow-2.c b/gcc/testsuite/c-c++-common/Wshift-count-overflow-2.c new file mode 100644 index 0000000..92032c0 --- /dev/null +++ b/gcc/testsuite/c-c++-common/Wshift-count-overflow-2.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Wno-shift-count-overflow" } */ + +void foo() +{ + unsigned i1 = 1U << (sizeof(unsigned) * __CHAR_BIT__); + unsigned i2 = 1U >> (sizeof(unsigned) * __CHAR_BIT__); +} |