summaryrefslogtreecommitdiffstats
path: root/src/antlr/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-23 04:05:03 +0100
committerSven Gothel <[email protected]>2015-03-23 04:05:03 +0100
commitb755b045fb7e3c8306f24dd645297992ab8db7f9 (patch)
tree4be9dfb52b0e0ed91d5376ef1d770552d3252d1e /src/antlr/com/jogamp
parent532b8df474976b474f0cf4eb2d93588ded2ad3fe (diff)
Bug 1149 - Replacing PCPP w/ JCPP, allowing complete macro handling (Part-1: Cleanup / Preparation)
Diffstat (limited to 'src/antlr/com/jogamp')
-rw-r--r--src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g7
1 files changed, 6 insertions, 1 deletions
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));
}