diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/no-asm-2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/no-asm-2.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/no-asm-2.C b/gcc/testsuite/g++.dg/ext/no-asm-2.C new file mode 100644 index 000000000..fa614d8e2 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/no-asm-2.C @@ -0,0 +1,10 @@ +// { dg-do compile } +// { dg-options "-fno-asm" } + +// Verify that the keyword asm and the GNU extension typeof are not +// recognized as keywords when using -fno-asm. Having -fno-asm affect +// a standard C++ keyword seems strange, but that is existing +// behaviour. If that behaviour changes, this test should change. + +int asm; // { dg-bogus "before .asm." } +int typeof; // { dg-bogus "before .typeof." } |