diff --git a/CHANGES b/CHANGES index e3f132b3d9..2756ccbae6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ +2.3-235 | 2014-10-15 10:20:47 -0500 + + * BIT-1273: Add error message for bad enum declaration syntax. + (Jon Siwek) + 2.3-234 | 2014-10-14 14:42:09 -0500 * Documentation fixes. (Steve Smoot) diff --git a/VERSION b/VERSION index 5433a332a3..dbd5144240 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3-234 +2.3-235 diff --git a/src/parse.y b/src/parse.y index 0289184055..83760dbbf0 100644 --- a/src/parse.y +++ b/src/parse.y @@ -127,7 +127,11 @@ static void parser_new_enum (void) { /* Starting a new enum definition. */ assert(cur_enum_type == NULL); - cur_enum_type = new EnumType(cur_decl_type_id->Name()); + + if ( cur_decl_type_id ) + cur_enum_type = new EnumType(cur_decl_type_id->Name()); + else + reporter->FatalError("incorrect syntax for enum type declaration"); } static void parser_redef_enum (ID *id)