summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/20000628-1a.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-29 19:30:34 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-29 19:30:34 +0000
commite2193622f0533ce1156cb41ecea42472d7083106 (patch)
tree6ff4a194b508a44c072e680e87ecd4926448136b /gcc/testsuite/gcc.dg/cpp/20000628-1a.h
parent120ffeba6c5ab4b2381f5a3adf88eeb0cbadc3a8 (diff)
downloadgcc-e2193622f0533ce1156cb41ecea42472d7083106.tar.gz
* gcc.dg/cpp/20000628-1a.h: On each of the first three inclusions,
declare one variable. On the fourth, error. * gcc.dg/cpp/20000628-1.c (main): Reference the three variables declared by 20000628-1a.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34790 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/20000628-1a.h')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/20000628-1a.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/20000628-1a.h b/gcc/testsuite/gcc.dg/cpp/20000628-1a.h
index 1b6ff80f4d9..0fdc46d58a3 100644
--- a/gcc/testsuite/gcc.dg/cpp/20000628-1a.h
+++ b/gcc/testsuite/gcc.dg/cpp/20000628-1a.h
@@ -1,2 +1,15 @@
-/* Included from 20000628-1.h */
-extern int x;
+/* Included from 20000628-1.h. This header is supposed to be seen
+ exactly three times. */
+
+#if !defined A
+#define A
+int a;
+#elif !defined B
+#define B
+int b;
+#elif !defined C
+#define C
+int c;
+#else
+#error Included a fourth time
+#endif