Fix bug where globals or static variables initialized with the address-of operator and pointer arithmetic could get the wrong value.

For example, p would not be correctly initialized given the following global definitions:
int a = 4;
int *p = &a + 1; /* *(p-1) should be 4 */
This commit is contained in:
Stephen Heumann 2015-12-29 00:44:10 -06:00
parent 8e7f46dc99
commit d65cc99d9a
1 changed files with 1 additions and 1 deletions

View File

@ -1993,7 +1993,7 @@ var
end {if}
else if kind = uand then begin
tree := tree^.left;
iPtr^.pPlus := operator = plusch;
iPtr^.pPlus := true;
iPtr^.isName := true;
if tree^.token.kind = ident then begin
ip := FindSymbol(tree^.token, allSpaces, false, true);