diff --git a/Parser.pas b/Parser.pas index 04dbd52..444557a 100644 --- a/Parser.pas +++ b/Parser.pas @@ -3265,7 +3265,9 @@ while token.kind in allowedTokens do begin NextToken; {skip the structure name} if structPtr = nil then begin {if the name hasn't been defined then...} if token.kind <> lbracech then - structPtr := FindSymbol(ttoken, tagSpace, false, true); + if (token.kind <> semicolonch) or + (myDeclarationModifiers <> []) then + structPtr := FindSymbol(ttoken, tagSpace, false, true); if structPtr <> nil then structTypePtr := structPtr^.itype else begin diff --git a/cc.notes b/cc.notes index be023c1..eded887 100644 --- a/cc.notes +++ b/cc.notes @@ -1899,6 +1899,10 @@ int foo(int[42]); 206. If an enum type defined in an outer scope was used in an inner scope, and then a new struct, union, or enum type was declared with the same tag in the same inner scope, a spurious error was reported. +(Bug fixes below here were added in ORCA/C 2.2.0 B7.) + +207. If a struct or union type with a tag T has been declared within an outer scope, a declaration "struct T;" or "union T;" within an inner scope should declare a separate type, distinct from the one in the outer scope. + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.