From b755b045fb7e3c8306f24dd645297992ab8db7f9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 23 Mar 2015 04:05:03 +0100 Subject: Bug 1149 - Replacing PCPP w/ JCPP, allowing complete macro handling (Part-1: Cleanup / Preparation) --- src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g') diff --git a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g index d159ff3..4bcb052 100644 --- a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g +++ b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g @@ -689,7 +689,12 @@ structDeclaration[CompoundType containingType] returns [boolean addedAny] { if (!addedAny) { if (t != null) { CompoundType ct = t.asCompound(); - if (ct.isUnion()) { + if( null == ct ) { + throwGlueGenException(structDeclaration_AST_in, + String.format("Anonymous compound, w/ NULL type:%n containing '%s'", + getTypeString(containingType))); + } + if ( ct.isUnion() ) { // Anonymous union containingType.addField(new Field(null, t, null)); } -- cgit v1.2.3