[Oberon] Bug in Oberon compiler? (no type descriptors created for anonymous record types)

Chris Burrows chris at cfbsoftware.com
Sat Sep 23 06:24:28 CEST 2017


I’m having difficulty understanding the possible intended use of your example. Did you really mean for x and y to be marked for export? If so, can you provide an example client module which would demonstrate how they could be usefully referenced?

 

Regards,

Chris Burrows

CFB Software

http://www.astrobe.com

 

 

From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of Andreas Pirklbauer
Sent: Saturday, 23 September 2017 12:17 AM
To: ETH Oberon and related systems
Cc: Andreas Pirklbauer
Subject: [Oberon] Bug in Oberon compiler? (no type descriptors created for anonymous record types)

 

It seems that the Oberon 2013 compiler on RISC creates type descriptors only for *named* record types, but not for *anonymous* record types. This creates a problem if a dynamic variable pointing to an anonymous record type is allocated in the heap via the predefined procedure NEW.

 

For example, in the following test program:

 

     MODULE M;

       TYPE R* = RECORD i: INTEGER END;

 

       VAR x*: POINTER TO R;

         y*: POINTER TO RECORD x, y, z: INTEGER END;

 

       PROCEDURE P*;

       BEGIN NEW(x)

       END P;

 

       PROCEDURE Q*;

       BEGIN NEW(y)

       END Q;

 

     END M.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20170923/a913a96e/attachment.html>


More information about the Oberon mailing list