[Compiler-v531]Add warning for Proc(*ptr.struct) not passed.
Posted: Fri Jan 16, 2015 5:59 am
Hard to find bug in a dll that did not flag a procedure parameter as incorrect data type.
I realize pointers can be anything, but if the Procedure is explicit, the compiler should at least give a warning.
I realize pointers can be anything, but if the Procedure is explicit, the compiler should at least give a warning.
Code: Select all
ProcedureDLL Do1(*p.ABC)
Debug *p\abcA
Debug *p\abcB
Debug *p\abcC
EndProcedure
Define.i x
Define *p.ABC = AllocateMemory(SizeOf(ABC))
*p\abcA = 1: *p\abcB = 2: *p\abcC = 3:
do1(@x) ;<-- Please add a warning here --> Expecting a Structure(ABC) or pointer to Structure(ABC).
do1(*p)