From f5ed48e3ee8db47e2235d012ae3c34c4cc2d73fd Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Tue, 8 Jul 2008 08:53:31 +0000 Subject: [PATCH] testcase for compound initializer, bug 145387 --- .../eclipse/cdt/core/parser/tests/ast2/AST2Tests.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java index 3cdbd5bdac8..b88fd51a592 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java @@ -5229,4 +5229,14 @@ public class AST2Tests extends AST2BaseTest { buf.append(expr.getRawSignature()); } } + + // typedef struct { + // int x; + // } spinlock_t; + // spinlock_t _lock = (spinlock_t) { }; + public void testCompoundInitializer_bug145387() throws Exception { + // valid in C99, not in C++. + parseAndCheckBindings(getAboveComment(), ParserLanguage.C, true); + } + }