diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/pr35602.C')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/pr35602.C | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/pr35602.C b/gcc/testsuite/g++.dg/warn/pr35602.C new file mode 100644 index 000000000..66a569b3d --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pr35602.C @@ -0,0 +1,28 @@ +// PR 35602 Bogus warning with -Wsign-conversion +// { dg-do compile } +// { dg-options "-Wconversion -Wsign-conversion" } +struct c +{ + ~c(); + c(); +}; + +int + +main(const int, + const char * const * const) +{ + c x[0UL][0UL] = // { dg-bogus "warning: conversion to .long unsigned int. from .long int. may change the sign of the result" } + { + }; + + c y[0UL] = + { + }; + + int z[0ul][0UL] = + { + }; + + return 0; +} |