diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/pr35711.C')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/pr35711.C | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/pr35711.C b/gcc/testsuite/g++.dg/warn/pr35711.C new file mode 100644 index 000000000..653269c0e --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pr35711.C @@ -0,0 +1,8 @@ +// PR 35711 +// { dg-do compile } +// { dg-options "-Wcast-qual" } + +int* foo (volatile int *p) +{ + return (int*)p; // { dg-warning "cast from type 'volatile int\\*' to type 'int\\*' casts away qualifiers" } +} |