You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MODULE test;
CONST
InitialSize = 64;
TYPE
something* = POINTER TO RECORD
length-: LONGINT; (* current length of string excluding 0X *)
bufferSize: LONGINT; (* {bufferSize >= InitialSize} *)
buffer : POINTER TO ARRAY OF CHAR;
END;
PROCEDURE (this: something) Clear*;
BEGIN
this.buffer[0] := 0X;
this.length := 0
END Clear;
PROCEDURE (this: something) Init*;
BEGIN
this.bufferSize := InitialSize;
NEW(this.buffer, this.bufferSize);
this.Clear
END Init;
END test.
when compiling we have a warning:
$ /opt/voc/bin/voc -s test.Mod
test.Mod Compiling test. 818 chars.
test.c: In function ‘test_something_Init’:
test.c:37:2: warning: implicit declaration of function ‘__test_something_Clear’; did you mean ‘test_something_Clear’? [-Wimplicit-function-declaration]
37 | __test_something_Clear(this);
| ^~~~~~~~~~~~~~~~~~~~~~
| test_something_Clear
this is solvable by removing the OPM.WriteString call at line 863 in OPV.Mod
IF n^.left^.subcl = OPT.super THEN proc := SuperProc(n)
ELSE (*OPM.WriteString("__");*) proc := OPC.BaseTProc(n^.left^.obj)
END ;
There is other OPM.WriteString("__"); at line 631 of OPV.Mod, that handles different case, and doesn't affect this one.
The text was updated successfully, but these errors were encountered:
when compiling we have a warning:
this is solvable by removing the
OPM.WriteString
call at line 863 in OPV.ModThere is other OPM.WriteString("__"); at line 631 of OPV.Mod, that handles different case, and doesn't affect this one.
The text was updated successfully, but these errors were encountered: