summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/no-asm-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/no-asm-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/no-asm-1.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/no-asm-1.c b/gcc/testsuite/gcc.dg/no-asm-1.c
new file mode 100644
index 00000000000..fdcf05459a4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/no-asm-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu89" } */
+
+/* Verify that these GNU extensions are recognized as keywords in
+ GNU89 mode. */
+
+int asm; /* { dg-error "before .asm." } */
+int inline; /* { dg-warning "empty declaration" } */
+/* { dg-error "empty declaration" "" { target *-*-* } 8 } */
+int typeof; /* { dg-error "before .typeof." } */