summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/no-asm-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/no-asm-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/no-asm-4.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/no-asm-4.c b/gcc/testsuite/gcc.dg/no-asm-4.c
new file mode 100644
index 000000000..c4c168780
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/no-asm-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -fno-asm" } */
+
+/* Verify that the GNU extensions asm and typeof are not recognized as
+ keywords when using -fno-asm in GNU89 mode, but that inline (which
+ is a keyword in C99 but not C89) is recognized. */
+
+int asm; /* { dg-bogus "before .asm." } */
+int inline; /* { dg-warning "empty declaration" } */
+/* { dg-error "empty declaration" "" { target *-*-* } 9 } */
+int typeof; /* { dg-bogus "before .typeof." } */