diff --git a/Parser.pas b/Parser.pas index e9291fd..27f96e2 100644 --- a/Parser.pas +++ b/Parser.pas @@ -3180,7 +3180,7 @@ while token.kind in allowedTokens do begin else if restrictsy in myDeclarationModifiers then Error(143); NextToken; {skip the 'enum' token} - if token.kind = ident then begin {handle a type definition} + if token.kind in [ident,typedef] then begin {handle a type definition} variable := FindSymbol(token, tagSpace, true, true); ttoken := token; NextToken; diff --git a/cc.notes b/cc.notes index d4af3c2..24f861c 100644 --- a/cc.notes +++ b/cc.notes @@ -1893,6 +1893,8 @@ int foo(int[42]); 204. Calling lseek() with a whence value of 2 and a negative offset should seek to a location before the end of the file, but it would not actually do so. (The problem was that lseek effectively negated the specified offset if whence was 2. It has been changed to avoid the negation. If any code relied on the old behavior by using a whence value of 2 with a positive offset to seek before the end of the file, it should be changed to use a negative offset instead.) +205. Using the same identifier as a typedef name and then as the tag for an enum would cause a spurious error. + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.