[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] gm2 errors
From: |
Iztok Kobal |
Subject: |
Re: [Gm2] gm2 errors |
Date: |
Sun, 02 Feb 2003 15:14:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
Gaius Mulley wrote:
Hi,
just a short message to say that I've uploaded gm2 changes into cvs
which fix bugs 1, 2 & 5.
Good.
Currently the range check in `bug 3' can be found at runtime when
-Wbounds is enabled.
I have found it after submiting the test programs.
But the compiler should really find this at
compile time..
I agree.
And I've got one more which I have forgotten to mention. Attached you
have the ChanConsts def and mod which has already been possible to
compile some time ago. Now it causes:
# gm2 -c -I. -g3 -gstabs+ -save-temps ChanConsts.mod
......./gm2-20021105+gcc-3.2/gcc/gm2/gm2-compiler/M2ALU.mod:435:***
internal error *** expecting type of constant to be a whole number
Regards !
Iztok
DEFINITION MODULE ChanConsts;
(* Common types and values for device open requests and results *)
(* Device modules may allow combinations of the following flags to be given
when a channel is opened. An open procedure may not accept or honor all
combinations. *)
TYPE
ChanFlags = (
readFlag, (* input operations are requested/available *)
writeFlag, (* output operations are requested/available *)
oldFlag, (* a file may/must/did exist before channel was opened *)
textFlag, (* text operations are requested/available *)
rawFlag, (* raw operations are requested/available *)
interactiveFlag, (* interactive use is requested/available *)
echoFlag (* echoing by interactive device on removal of
* characters from input stream requested/applies *)
);
FlagSet = SET OF ChanFlags;
(* Singleton values of FlagSet, to allow for example, read+write. *)
CONST
read = FlagSet{readFlag};
write = FlagSet{writeFlag};
old = FlagSet{oldFlag};
text = FlagSet{textFlag};
raw = FlagSet{rawFlag};
interactive = FlagSet{interactiveFlag};
echo = FlagSet{echoFlag};
TYPE
OpenResults = ( (* Possible results of open requests *)
opened, (* the open succeeded as requested *)
wrongNameFormat, (* given name is in the wrong format for the
implementation *)
wrongFlags, (* given flags include a value that does not apply to
device *)
tooManyOpen, (* this device cannot support any more open channels *)
outOfChans, (* no more channels can be allocated *)
wrongPermissions,(* file or directory permissions do not allow request *)
noRoomOnDevice, (* storage limits on the device prevent the open *)
noSuchFile, (* a needed file does not exist *)
fileExists, (* file of given name already exists, a new one is
required *)
wrongFileType, (* file is of the wrong type to support required
operations *)
noTextOperations,(* text operations have been requested but are not
supported *)
noRawOperations, (* raw operations have been requested but are not
supported *)
noMixedOperations,(*text and binary operations have been requested but they
are not supported in combination *)
alreadyOpen, (* the source/destination is already open for operations
not
supported in combination with the requested operations *)
otherProblem (* open failed for some other reason *)
);
END ChanConsts.
(* ---------------------------------------------------------------------
* This program is copyright (c) 1996 Faculty of Information Technology,
* Queensland University of Technology, Brisbane, Australia.
* The program may be freely distributed in source or compiled form,
* provided this copyright notice remains intact in the sources.
* --------------------------------------------------------------------- *)
(****************************************************************
$Log: chanconsts.mod,v $
Revision 1.1 2003/01/30 17:41:30 iztokk
*** empty log message ***
Revision 1.1 1996/09/06 07:51:11 lederman
Initial revision
*)
IMPLEMENTATION MODULE ChanConsts;
(* Common types and values for device open requests and results *)
(*****************************************************************)
(* *)
(* NO SEPARATE IMPLEMENTATION REQUIRED *)
(* *)
(*****************************************************************)
END ChanConsts.