PROCEDURE P ( VAR x : RECORD END );
Closed this issue · 0 comments
Oleg-N-Cher commented
GameHunter reports:
PROCEDURE P ( VAR x : RECORD END );
BEGIN
END P;
This code leads to the generation of a program that crashes inside the macro __INITYP:
if(t##__desc.blksz!=sizeof(struct t)) __HALT(-15);
__TDESC(Ex__1__desc, 1, 0) = {__TDFLDS("", -1), {-4}};
We can see that the size of the type (blksz) is equal to -1 (undefined), yet it is not expected that a RECORD will be a description of the type of a parameter directly. At the same time, such code is not prohibited. I suggest a very simple fix.