diff --git a/CHANGES.current b/CHANGES.current index 8469fa815..3d5c27950 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 1.3.41 (in progress) ============================ +2009-11-15: wsfulton + Fix #1960977 - Syntax error parsing derived nested class declaration and member + variable instance. + 2009-11-14: wsfulton Fix #2310483 - function pointer typedef within extern "C" block. diff --git a/Examples/test-suite/derived_nested.i b/Examples/test-suite/derived_nested.i index 9a7cfce07..29114d5a0 100644 --- a/Examples/test-suite/derived_nested.i +++ b/Examples/test-suite/derived_nested.i @@ -6,6 +6,7 @@ This was reported in bug #909389 */ %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::CC; %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::DD; %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::EE; +%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::FF; %inline %{ @@ -19,6 +20,7 @@ struct BB { class CC { int y; }; class DD : public A { int z; }; struct EE : public A { int z; }; + struct FF : public A { int z; } ff_instance; // Bug 1960977 void useEE(const EE& e) {} }; %} diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index f78d5255b..b87ba9368 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -4483,7 +4483,7 @@ cpp_nested : storage_class cpptype ID LBRACE { cparse_start_line = cparse_line /* This adds one shift/reduce. */ | storage_class cpptype idcolon COLON base_list LBRACE { cparse_start_line = cparse_line; skip_balanced('{','}'); - } SEMI { + } cpp_opt_declarators { $$ = 0; if (cplus_mode == CPLUS_PUBLIC) { $$ = nested_forward_declaration($2, $3);