summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/no-asm-4.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-10 01:41:06 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-10 01:41:06 +0000
commitd4fc5c3c5a7d70f7b3a9e2e38a1955714b400fee (patch)
tree4d595d7e802be1437284b339e41e8501f93a2a8d /gcc/testsuite/gcc.dg/no-asm-4.c
parenta9e266892f05f5f00ea8e457306965f4dab980e1 (diff)
downloadgcc-d4fc5c3c5a7d70f7b3a9e2e38a1955714b400fee.tar.gz
* gcc.dg/no-asm-1.c: New test.
* gcc.dg/no-asm-2.c: New test. * gcc.dg/no-asm-3.c: New test. * gcc.dg/no-asm-4.c: New test. * g++.dg/ext/no-asm-1.C: New test. * g++.dg/ext/no-asm-2.C: New test. * g++.dg/ext/no-gnu-keywords-1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137684 138bc75d-0d04-0410-961f-82ee72b054a4
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 00000000000..c4c1687800c
--- /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." } */