gm2
[Top][All Lists]
Advanced

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

[Gm2] Modula 2 Syntax


From: address@hidden
Subject: [Gm2] Modula 2 Syntax
Date: Wed, 08 Jul 2015 23:32:44 +0200

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?

 

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

 

Attachment: bug2.tar.gz
Description: application/gzip


reply via email to

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