diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/sc1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/sc1.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/sc1.C b/gcc/testsuite/g++.old-deja/g++.other/sc1.C new file mode 100644 index 000000000..054a57a6c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/sc1.C @@ -0,0 +1,10 @@ +// { dg-do assemble } +// Origin: Mark Mitchell <mark@codesourcery.com> + +void f() { + int *i = 0; + const int *c = 0; + + static_cast <const int *>(i); + static_cast <int *>(c); // { dg-error "" } casts away constness +} |