gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] Modula 2 Syntax


From: Gaius Mulley
Subject: Re: [Gm2] Modula 2 Syntax
Date: Fri, 10 Jul 2015 18:23:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"address@hidden" <address@hidden> writes:

> Hello Gaius, all,
>
> while migrating my code from GPM compiler to GM2 I run into the
> following problems:
>
> The GPM compiler requires "FORWARD" declarations, while GM2 seems to
> not support them. Is there some switch for GM2 so I can compile the
> same code in both environments? Would it be possible to ignore the
> forward-declarations in GM2?

Hi Georg,

ah yes I had wondered about this issue.  It would be very easy to make
gm2 ignore FORWARD declarations.  Reasonably easy to make gm2 check the
contents of FORWARD declarations.  You are right gm2 does not need (or
support) FORWARD declarations at present.


> I want to use a one letter string literal in a procedure call where a
> String parameter is required. 
>
> WriteToken("=");
>
> but am getting compile errors:
>
> error: 1st actual parameter type 'CHAR' is incompatible with the
> formal parameter type 'Str20'. 
>
> In an assignment statment, the types are correctly calculated, but not
> in a procedure call. That seems to be unlogical.
>
> If the above code is wrapped into a procedure call, I run into a
> compile error: 
>
> In Funktion »Test«:
> cc1gm2: interner Compiler-Fehler: in convert, bei gm2/gm2-lang.c:885
> Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
> bearbeiten Sie die Quellen zunächst mit einem Präprozessor, wenn es
> dienlich ist.
>
> Two sample files to reproduce the error are attached. I am using the
> pre-build packages "GNU Modula-2 1.1.3 (20150420) grafted onto GCC
> 4.7.4" on my Ubuntu 14.4 system (64 bit).
>
> To start the compile, I execute:
>
> gm2 -g -c -fiso *.mod
>
> Thanks and regards, Georg

ah this looks like a bug - many thanks for the report - I will fix it

regards,
Gaius



reply via email to

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