Don't give an error when calling functions with const-qualified parameter types or returning from functions with const-qualified return type.

This fixes the compco12.c test case.
This commit is contained in:
Stephen Heumann 2016-12-13 21:46:11 -06:00
parent 49ddf5abf1
commit f099222af6
2 changed files with 2 additions and 2 deletions

View File

@ -2658,7 +2658,7 @@ var
if pCount = 0 then begin
if parameters <> nil then begin
AssignmentConversion(parameters^.parameterType,
expressionType, lastWasConst, lastConst, true, true);
expressionType, lastWasConst, lastConst, true, false);
end; {if}
parameters := parameters^.next;
end {if}

View File

@ -701,7 +701,7 @@ var
end; {if}
Expression(normalExpression, [semicolonch]);
AssignmentConversion(fType, expressionType, lastWasConst, lastConst,
true, true);
true, false);
case fType^.kind of
scalarType: Gen2t(pc_str, 0, 0, fType^.baseType);
enumType: Gen2t(pc_str, 0, 0, cgWord);