mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2026-04-26 21:18:08 +00:00
Disallow mistyped expressions for the function in function calls.
Previously, the code would remove any number of "pointer to" and "array of" elements in the type, and accept it if this ultimately yielded a function type. Thus, the expressions denoting the function to be called could be, e.g., a pointer to a function pointer or an array of function pointers. The code generated in these cases would not work properly, but no error was reported. Now only function pointers or expressions of function type are accepted, as they should be.
This commit is contained in:
1 parent
9fffb51b96
commit
ca5a93e974
1 file changed
+1
-1
+1
-1
@@ -3733,7 +3733,7 @@ var
|
||||
doDispose := ldoDispose;
|
||||
codeGeneration := lCodeGeneration and (numErrors = 0);
|
||||
ftype := expressionType;
|
||||
while ftype^.kind in [pointerType,arrayType] do
|
||||
if ftype^.kind = pointerType then
|
||||
ftype := ftype^.ptype;
|
||||
end; {if}
|
||||
|
||||
|
||||
Reference in new issue
Block a user