mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-18 03:29:49 +00:00
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:
parent
49ddf5abf1
commit
f099222af6
@ -2658,7 +2658,7 @@ var
|
|||||||
if pCount = 0 then begin
|
if pCount = 0 then begin
|
||||||
if parameters <> nil then begin
|
if parameters <> nil then begin
|
||||||
AssignmentConversion(parameters^.parameterType,
|
AssignmentConversion(parameters^.parameterType,
|
||||||
expressionType, lastWasConst, lastConst, true, true);
|
expressionType, lastWasConst, lastConst, true, false);
|
||||||
end; {if}
|
end; {if}
|
||||||
parameters := parameters^.next;
|
parameters := parameters^.next;
|
||||||
end {if}
|
end {if}
|
||||||
|
@ -701,7 +701,7 @@ var
|
|||||||
end; {if}
|
end; {if}
|
||||||
Expression(normalExpression, [semicolonch]);
|
Expression(normalExpression, [semicolonch]);
|
||||||
AssignmentConversion(fType, expressionType, lastWasConst, lastConst,
|
AssignmentConversion(fType, expressionType, lastWasConst, lastConst,
|
||||||
true, true);
|
true, false);
|
||||||
case fType^.kind of
|
case fType^.kind of
|
||||||
scalarType: Gen2t(pc_str, 0, 0, fType^.baseType);
|
scalarType: Gen2t(pc_str, 0, 0, fType^.baseType);
|
||||||
enumType: Gen2t(pc_str, 0, 0, cgWord);
|
enumType: Gen2t(pc_str, 0, 0, cgWord);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user