diff --git a/Parser.pas b/Parser.pas index 25bf3d1..3f01793 100644 --- a/Parser.pas +++ b/Parser.pas @@ -2011,7 +2011,7 @@ var end; {else} end {else if} else if tree^.token.kind = ident then begin - ip := FindSymbol(tree^.token, allSpaces, false, true); + ip := FindSymbol(tree^.token, variableSpace, false, true); if ip = nil then begin Error(31); errorFound := true; @@ -2231,7 +2231,7 @@ var if kind = ident then begin {handle names of functions or static arrays} - ip := FindSymbol(tree^.token, allSpaces, false, true); + ip := FindSymbol(tree^.token, variableSpace, false, true); if ip = nil then begin Error(31); errorFound := true; @@ -2267,7 +2267,7 @@ var iPtr^.pPlus := true; iPtr^.isName := true; if tree^.token.kind = ident then begin - ip := FindSymbol(tree^.token, allSpaces, false, true); + ip := FindSymbol(tree^.token, variableSpace, false, true); if ip = nil then begin Error(31); errorFound := true; diff --git a/cc.notes b/cc.notes index 448d27d..723e840 100644 --- a/cc.notes +++ b/cc.notes @@ -2144,6 +2144,8 @@ int foo(int[42]); 236. If a typedef name was used immediately after the end of an inner scope where the same name was used as a variable name or struct/union/enum tag, it might not be properly recognized as a typedef name, leading to spurious errors. +237. If the same identifier was used for both a variable or function name and a struct/union/enum tag, it might not be possible to take the address of the variable or function within the initializer for a static variable. + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.