gm2
[Top][All Lists]
Advanced

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

Re: Boolean constants


From: Gaius Mulley
Subject: Re: Boolean constants
Date: Sun, 25 Aug 2024 16:11:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Michael Riedl <udo-michael.riedl@t-online.de> writes:

> Hallo Gaius,
>
> can you have a look on the following small piece of code:
>
> MODULE TestBool;
>
> CONST Logical1 = TRUE;
>
>       Logical2 = NOT Logical1; (* crash *)
>       Logical3 = NOT TRUE;     (* crash *)
>
>       Logical4 = (1 = 0);      (* crash *)
>       Logical5 = (1 = 1);      (* crash *)
> BEGIN
> END TestBool.
>
> I would think that at least the line "Logical2 = NOT Logical1;" and
> "Logical3 = NOT TRUE;" should be OK.
>
> The lines with Logical4 and Logical5 are for sure "quick and dirty"
> but handy to quickly switch off and on some code segments during
> development (would not do that in production code).
>
> Gruß / Greetings
>
> Michael

Hi Michael,

Which version of gm2 (gcc-14 I suspect?).  It is fixed in gm2-15:

$ gm2 TestBool.mod 
$ ./a.out
$ gm2 --version
gm2 (GCC) 15.0.0 20240824 (experimental)

A very useful reminder that I need to backport some of the gm2-15 fixes
to gm2-14,

regards,
Gaius



reply via email to

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