gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] assignment of nested records


From: Gaius Mulley
Subject: Re: [Gm2] assignment of nested records
Date: Tue, 15 Dec 2009 23:37:05 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Martin Kalbfuß <address@hidden> writes:

> Hi,
>
> This code doesn't work. But following the siso tandard it should.
> The compiler should now the nested type from the record.
> I think the same is true for multidimensional arrays. But I didn't
> checked this.
>
> MODULE nested;
>
> IMPORT EXCEPTIONS;
>
> TYPE NestedRecord = RECORD
>       firstMember : INTEGER;
>       secondMebmer : INTEGER;
>      END;
>
>      TopRecord = RECORD
>       firstMember  : NestedRecord;
>       secondMember : INTEGER; 
>      END;
>
> VAR topRecord    : TopRecord;
>
> BEGIN
>       topRecord := TopRecord{ { 1, 2 }, 3 };
> END nested.
>
> Thanks,

Hi Martin,

   * The following changes fix a bug reported by Martin Kalbfuß
     (see testsuite/gm2/iso/run/pass/nestediso.mod).
   * gm2/gm2-compiler/M2ALU.mod:  (GetConstructorElement)
     ensure that upon an error NulSym is returned.  Also
     allow 0C to be returned if an CHAR ARRAY is being
     created and the initial string is shorter than
     the actual array size.
   * gm2/gm2-compiler/M2GenGCC.mod:  tidied up comment.
   * gm2/gm2-compiler/M2Quads.def:  corrected comment for
     BuildConstructorEnd.  New functions (NextConstructorField),
     (BuildTypeForConstructor).
   * gm2/gm2-compiler/M2Quads.mod:  new data structure
     ConstructorFrame.  New function (BuildTypeForConstructor),
     (PushConstructor), (PopConstructor), (NextConstructorField).
     BuildConstructorEnd reimplemented.
   * gm2/gm2-compiler/SymbolTable.mod:  changed debugging watch
     values.

now fixed in the latest cvs,

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]