summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/extern-C-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/extern-C-1.C')
-rw-r--r--gcc/testsuite/g++.dg/parse/extern-C-1.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/extern-C-1.C b/gcc/testsuite/g++.dg/parse/extern-C-1.C
new file mode 100644
index 000000000..60a634832
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/extern-C-1.C
@@ -0,0 +1,13 @@
+/* PR c++/4754 */
+/* { dg-do compile } */
+// GCC 3.2 got very confused by the nested extern "C" blocks, and thought
+// there was a storage class specifier on 'int i'.
+
+extern "C"
+{
+ extern "C" struct Test
+ {
+ int i;
+ };
+}
+