gm2
[Top][All Lists]
Advanced

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

[Gm2] GM2 - circular dependancies ?


From: Manhart Matthias
Subject: [Gm2] GM2 - circular dependancies ?
Date: Thu, 26 Dec 2002 19:14:54 +0100

Hello,

i would like to port a rather large Modula-Project (Logitech Modula-2
Release 4.0) to GM2. I started with some basic modules 

and detected the following problem:

--------------- test.def ---------------
DEFINITION MODULE test;
TYPE
  test_type   = CARDINAL;
  Error_Proc  = PROCEDURE(ARRAY OF CHAR, ARRAY OF CHAR);
END test.

--------------- test.mod ---------------
IMPLEMENTATION MODULE test;
VAR
  xError_Procedure : Error_Proc;
BEGIN
  (* empty *)
END test.

--------------- hello.mod ---------------
MODULE hello;
FROM StrIO IMPORT WriteString, WriteLn ;
FROM test IMPORT test_type;
BEGIN
  WriteString('hello world') ; WriteLn;
END hello.

--------------- makefile ----------------
all: force
 gm2 -o hello -Wbounds -Wreturn -g -I. -Wmake-I=. -Wmakeall hello.mod

clean:
 $(RM) *.o a.out

force:

-----------------------------------------

When i run the makefile, i get the following error:

gm2 -o hello -Wbounds -Wreturn -g -I. -Wmake-I=. -Wmakeall hello.mod
make[1]: Entering directory `/home/hello'
gm2 -c -Wmakeall0 -g -Wbounds -Wreturn -Wmake-I=. -Wmakeall
-I.:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/gm2 hello.mod
internal error: circular type dependancy on symbol Error_Proc 

(82)../../gm2-20021105+gcc-3.2/gcc/gm2/gm2-compiler/M2GCCDeclare.mod:336
:*** internal error *** circular dependancies within 

above types
make[1]: Leaving directory `/home/hello'

The code is correct. Can someone help me ?

Thanks

Matthias Manhart
Switzerland



reply via email to

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