Guy T.
2020-03-20 00:42:13 UTC
Hello All,
I'm currently playing with the Project Oberon compiler. Adding code from the Extended Oberon effort, I found a potential bug in the current compiler. In file ORP.Mod, inside the Declarations procedure, there is the following lines:
IF (x.type.form = ORB.String) & (x.b = 2) THEN ORG.StrToChar(x) END ;
ORB.NewObj(obj, id, ORB.Const); obj.expo := expo;
IF x.mode = ORB.Const THEN obj.val := x.a; obj.lev := x.b; obj.type := x.type
When a string constant is declared, x.b receives the string length (including the null character at the end). On the third line above, the obj.lev is receiving the string length, not the level of the declaration. Is it the right intent? If not, it would then be preferable to get the level as follow maybe:
IF (x.type.form = ORB.String) & (x.b = 2) THEN ORG.StrToChar(x) END ;
ORB.NewObj(obj, id, ORB.Const); obj.expo := expo;
IF x.mode = ORB.Const THEN obj.val := x.a; obj.lev := level; obj.type := x.type
Is there a place on the Internet where I can signal this kind of issue?
Cheers
Guy
I'm currently playing with the Project Oberon compiler. Adding code from the Extended Oberon effort, I found a potential bug in the current compiler. In file ORP.Mod, inside the Declarations procedure, there is the following lines:
IF (x.type.form = ORB.String) & (x.b = 2) THEN ORG.StrToChar(x) END ;
ORB.NewObj(obj, id, ORB.Const); obj.expo := expo;
IF x.mode = ORB.Const THEN obj.val := x.a; obj.lev := x.b; obj.type := x.type
When a string constant is declared, x.b receives the string length (including the null character at the end). On the third line above, the obj.lev is receiving the string length, not the level of the declaration. Is it the right intent? If not, it would then be preferable to get the level as follow maybe:
IF (x.type.form = ORB.String) & (x.b = 2) THEN ORG.StrToChar(x) END ;
ORB.NewObj(obj, id, ORB.Const); obj.expo := expo;
IF x.mode = ORB.Const THEN obj.val := x.a; obj.lev := level; obj.type := x.type
Is there a place on the Internet where I can signal this kind of issue?
Cheers
Guy