diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/expr/overflow1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/expr/overflow1.C | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/expr/overflow1.C b/gcc/testsuite/g++.dg/expr/overflow1.C new file mode 100644 index 00000000000..b67b4e42edd --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/overflow1.C @@ -0,0 +1,8 @@ +#include <limits.h> + +enum E { + A = (unsigned char)-1, /* OK */ + B = (signed char)UCHAR_MAX, /* implementation-defined */ + C = INT_MAX+1, /* undefined (C)/ill-formed (C++) { dg-message "" } */ + D = UINT_MAX+1 /* OK */ +}; |