[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: Error with Opaque types in GNU Modula-2?
From: |
Gaius Mulley |
Subject: |
re: Error with Opaque types in GNU Modula-2? |
Date: |
Tue, 21 Jan 2025 12:55:04 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
> Finally, TryMinOpaque.mod:
> MODULE TryMinOpaque;
> FROM InOut IMPORT WriteString, WriteLn, WriteInt;
> FROM MinOpaque IMPORT Opaque, Make;
>
> VAR o: Opaque;
>
> BEGIN
> Make (o, 10);
> o^ := 20; (* I thought this was illegal. *)
> WriteString ("o^: "); WriteInt (o^, 0); WriteLn;
> END TryMinOpaque.
Thanks for the bug report - yes indeed this looks like a bug and I'll
log a PR and fix it!
> I thought you didn't have access to the internals of type Opaque in
> Modula-2. Is this a bug in gm2, or am I misunderstanding?
>
> $ gm2 --version
> gm2 (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
> Copyright (C) 2024 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> This is on Fedora 41 with
> $ uname -a
> Linux atla 6.12.8-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 2 19:26:03
> UTC 2025 x86_64 GNU/Linux
regards,
Gaius