Allow dereferencing pointers to const struct or const union types.
This fixes the bug in the compca03.c test case.
This commit is contained in:
parent
c4360c70a1
commit
c788052b99
|
@ -3456,7 +3456,9 @@ case tree^.token.kind of
|
|||
else if lType^.kind = pointerType then
|
||||
Gen1t(pc_ind, 0, cgULong)
|
||||
else if not
|
||||
(lType^.kind in [functionType,arrayType,structType,unionType]) then
|
||||
((lType^.kind in [functionType,arrayType,structType,unionType])
|
||||
or ((lType^.kind = definedType) and {handle const struct/union}
|
||||
(lType^.dType^.kind in [structType,unionType]))) then
|
||||
Error(79);
|
||||
end {if}
|
||||
else if not (lType^.kind in [structType,unionType]) then
|
||||
|
|
Loading…
Reference in New Issue