[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Gm2] Re: Comparission bug ?
From: |
Breeden, Thomas (tmb) |
Subject: |
RE: [Gm2] Re: Comparission bug ? |
Date: |
Sun, 25 Jan 2009 21:14:22 -0500 |
> Iztok Kobal <address@hidden> writes:
> (gm2 on top of gcc-4.1.2)
>
> This should go through, I guess :-\
>
> MODULE test;
>
> TYPE
> Enum = (A, B, C, D);
> Typ = [A..D];
>
> VAR
> typ : Typ;
>
> BEGIN
> IF typ = A THEN
> typ := B;
> END;
> END test.
>
> gm2 -c -I. -fiso test.mod
> test.mod: In function '_M2_test_init':
> test.mod:10: error: invalid operands to binary !=
>
>
> Regards, Iztok
> Gaius writes:
>
> yes it should! Many thanks for the report and test code..
Another thing I noticed, with surprise, when browsing the ISO document was that
these following
should go through as well:
MODULE test;
TYPE Enum = (A, B, C, D);
Typ = [B..D];
VAR typ : Typ;
styp :SET OF Typ;
BEGIN
IF typ = A THEN
typ := B;
END;
IF A IN styp THEN
typ := B;
END;
END test.
since the "host type", or "base type" for subranges and set types respectively
determines the expression compatibility, not the subrange type or set type
itself.
Sorry I can't test it myself on Gnu M2.
Tom