]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fixup noreturn attributes in modula-2 [PR108551] and [PR108612]
authorGaius Mulley <gaiusmod2@gmail.com>
Wed, 1 Feb 2023 17:26:00 +0000 (17:26 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Wed, 1 Feb 2023 17:26:00 +0000 (17:26 +0000)
PR108612 - m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control
reaches end of non-void function [-Werror=return-type]
PR108551 - gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control
reaches end of non-void function [-Werror=return-type]
This patch adds missing return values to the procedure functions
mentioned in PR108612 and PR108551.  It corrects the noreturn
attribute to throw and rethrow in the modula2 frontend.  The patch
also changes HALT, Halt, Raise procedures in the libraries to use
the <* noreturn *> attribute.  Finally the patch includes
rebuilt bootstrap tools mc and pge.

gcc/m2/ChangeLog:

* Make-lang.in (GM2_FLAGS): Add -fno-return -Wreturn-type.
(GM2_ISO_FLAGS): Add -fno-return -Wreturn-type.
* Make-maintainer.in (GM2PATH): Split into separate -I components.
(MC-LIB-DEFS): Add RTentity.def.
(m2/boot-bin/mc-devel$(exeext)): Changed -I$(GM2PATH) to
$(GM2PATH).
(m2/boot-bin/mc-opt$(exeext)): Separate -I paths.
(m2/mc/decl.o): Separate -I paths.
(gm2-bootstrap): Separate -I paths.
(m2/mc-boot-gen/$(SRC_PREFIX)%.h): Separate -I paths.
(m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Separate -I paths.
(m2/mc-boot-gen/$(SRC_PREFIX)%.c): Separate -I paths.
(gm2.verifyparanoid): Separate -I paths.
(gm2.verifystage12): Separate -I paths.
* gm2-compiler/M2ALU.mod (GetConstructorElement): Add default
Return NulSym.  Remove return from the error case.
* gm2-compiler/M2Base.mod (ComplexToScalar): Return RType
from the error case.
(MixMetaTypes):  Return MakeError as a default.
* gm2-compiler/M2GCCDeclare.mod (GetTypeMin): Return NulSym
from the error case.
(GetTypeMax): Return NulSym from the error case.
* gm2-compiler/M2GenGCC.mod (IsExportedGcc): Replace Assert
by InternalError.
* gm2-compiler/M2Quads.mod (GetItemPointedTo): Add InternalError.
(GetTypeMin): Add InternalError.
(GetTypeMax): Add InternalError.
* gm2-compiler/M2System.mod (InitSystem): Call
PutProcedureNoReturn on Throw.
* gm2-gcc/m2except.cc (m2except_InitExceptions): fn_throw_tree
declare as noreturn.  fn_rethrow_tree declare as noreturn.
* gm2-libs-coroutines/Debug.def (Halt): Add noreturn attribute.
* gm2-libs-coroutines/SYSTEM.def (THROW): Add noreturn attribute.
* gm2-libs-iso/ClientSocket.mod (dorbytes): Add return FALSE.
* gm2-libs-iso/EXCEPTIONS.def (RAISE): Add noreturn attribute.
* gm2-libs-iso/IOLink.def (RAISEdevException): Add noreturn attribute.
* gm2-libs-iso/M2RTS.def (HALT): Add noreturn attribute.
(Halt): Ditto.
(HaltC): Ditto.
(ErrorMessage): Ditto.
(AssignmentException): Ditto.
(ReturnException): Ditto.
(IncException): Ditto.
(DecException): Ditto.
(InclException): Ditto.
(ExclException): Ditto.
(ShiftException): Ditto.
(RotateException): Ditto.
(StaticArraySubscriptException): Ditto.
(DynamicArraySubscriptException): Ditto.
(ForLoopBeginException): Ditto.
(ForLoopToException): Ditto.
(ForLoopEndException): Ditto.
(PointerNilException): Ditto.
(NoReturnException): Ditto.
(CaseException): Ditto.
(WholeNonPosDivException): Ditto.
(WholeNonPosModException): Ditto.
(WholeZeroDivException): Ditto.
(WholeZeroRemException): Ditto.
(WholeValueException): Ditto.
(RealValueException): Ditto.
(ParameterException): Ditto.
(NoException): Ditto.
* gm2-libs-iso/SYSTEM.def (THROW): Ditto.
* gm2-libs-iso/TermFile.mod (dorbytes): Add default return FALSE.
* gm2-libs-min/M2RTS.def: Add noreturn attribute.
* gm2-libs/FIO.mod (BufferedRead): Return -1.
(getFileName): Return NIL.
(getFileNameLength): Return 0.
* gm2-libs/M2RTS.def (HaltC): Add noreturn attribute.
(AssignmentException): Ditto.
(ReturnException): Ditto.
(IncException): Ditto.
(DecException): Ditto.
(InclException): Ditto.
(ExclException): Ditto.
(ShiftException): Ditto.
(RotateException): Ditto.
(StaticArraySubscriptException): Ditto.
(DynamicArraySubscriptException): Ditto.
(ForLoopBeginException): Ditto.
(ForLoopToException): Ditto.
(ForLoopEndException): Ditto.
(PointerNilException): Ditto.
(NoReturnException): Ditto.
(CaseException): Ditto.
(WholeNonPosDivException): Ditto.
(WholeNonPosModException): Ditto.
(WholeZeroDivException): Ditto.
(WholeZeroRemException): Ditto.
(WholeValueException): Ditto.
(RealValueException): Ditto.
(ParameterException): Ditto.
(NoException): Ditto.
* gm2-libs/RTExceptions.def (Raise): Ditto.
* gm2-libs/RTExceptions.mod (InvokeHandler): Ditto.
* gm2-libs/SYSTEM.def (THROW): Ditto.
* m2.flex (_M2_m2flex_fini): Remamed to...
(_M2_m2flex_finish): ...here.
* mc-boot-ch/GBuiltins.c (_M2_Builtins_finish): Remamed to...
(_M2_Builtins_fini): ...this.
* mc-boot-ch/GRTco.c (_M2_RTco_finish): Remamed to...
(_M2_RTco_fini): ...this.
* mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_finish): Remamed to...
(_M2_SYSTEM_fini): ...this.
* mc-boot-ch/GSelective.c (_M2_Selective_finish): Remamed to...
(_M2_Selective_fini): ...this.
* mc-boot-ch/GSysExceptions.c (_M2_SysExceptions_init): Add
parameters.
(_M2_SysExceptions_finish): Remamed to...
(_M2_SysExceptions_fini): ...this.
* mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_finish): Remamed to...
(_M2_UnixArgs_fini): ...this.
(_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): Change parameter
to _M2_UnixArgs_fini.
* mc-boot-ch/Gdtoa.c (_M2_dtoa_finish): Remamed to...
(_M2_dtoa_fini): ...this.
* mc-boot-ch/Gerrno.c (_M2_errno_finish): Remamed to...
(_M2_errno_fini): ...this.
* mc-boot-ch/Gldtoa.c (_M2_ldtoa_finish): Remamed to...
(_M2_ldtoa_fini): ...this.
* mc-boot-ch/Gtermios.cc (_M2_termios_init): Add parameters.
(_M2_termios_finish): Remamed to...
(_M2_termios_fini): ...this.
* mc-boot-ch/Gwrapc.c (_M2_wrapc_init): Add parameters.
(_M2_wrapc_finish): Remamed to...
(_M2_wrapc_fini): ...this.
* mc-boot/GASCII.c: Rebuild.
* mc-boot/GArgs.c: Rebuild.
* mc-boot/GAssertion.c: Rebuild.
* mc-boot/GBreak.c: Rebuild.
* mc-boot/GCmdArgs.c: Rebuild.
* mc-boot/GDebug.c: Rebuild.
* mc-boot/GDynamicStrings.c: Rebuild.
* mc-boot/GEnvironment.c: Rebuild.
* mc-boot/GFIO.c: Rebuild.
* mc-boot/GFormatStrings.c: Rebuild.
* mc-boot/GFpuIO.c: Rebuild.
* mc-boot/GIO.c: Rebuild.
* mc-boot/GIndexing.c: Rebuild.
* mc-boot/GM2Dependent.c: Rebuild.
* mc-boot/GM2EXCEPTION.c: Rebuild.
* mc-boot/GM2RTS.c: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GMemUtils.c: Rebuild.
* mc-boot/GNumberIO.c: Rebuild.
* mc-boot/GPushBackInput.c: Rebuild.
* mc-boot/GRTExceptions.c: Rebuild.
* mc-boot/GRTExceptions.h: Rebuild.
* mc-boot/GRTco.h: Rebuild.
* mc-boot/GRTint.c: Rebuild.
* mc-boot/GSArgs.c: Rebuild.
* mc-boot/GSFIO.c: Rebuild.
* mc-boot/GStdIO.c: Rebuild.
* mc-boot/GStorage.c: Rebuild.
* mc-boot/GStrCase.c: Rebuild.
* mc-boot/GStrIO.c: Rebuild.
* mc-boot/GStrLib.c: Rebuild.
* mc-boot/GStringConvert.c: Rebuild.
* mc-boot/GSysStorage.c: Rebuild.
* mc-boot/GTimeString.c: Rebuild.
* mc-boot/Galists.c: Rebuild.
* mc-boot/Gdecl.c: Rebuild.
* mc-boot/Gkeyc.c: Rebuild.
* mc-boot/Glists.c: Rebuild.
* mc-boot/GmcComment.c: Rebuild.
* mc-boot/GmcComp.c: Rebuild.
* mc-boot/GmcDebug.c: Rebuild.
* mc-boot/GmcError.c: Rebuild.
* mc-boot/GmcFileName.c: Rebuild.
* mc-boot/GmcLexBuf.c: Rebuild.
* mc-boot/GmcMetaError.c: Rebuild.
* mc-boot/GmcOptions.c: Rebuild.
* mc-boot/GmcPreprocess.c: Rebuild.
* mc-boot/GmcPretty.c: Rebuild.
* mc-boot/GmcPrintf.c: Rebuild.
* mc-boot/GmcQuiet.c: Rebuild.
* mc-boot/GmcReserved.c: Rebuild.
* mc-boot/GmcSearch.c: Rebuild.
* mc-boot/GmcStack.c: Rebuild.
* mc-boot/GmcStream.c: Rebuild.
* mc-boot/Gmcp1.c: Rebuild.
* mc-boot/Gmcp2.c: Rebuild.
* mc-boot/Gmcp3.c: Rebuild.
* mc-boot/Gmcp4.c: Rebuild.
* mc-boot/Gmcp5.c: Rebuild.
* mc-boot/GnameKey.c: Rebuild.
* mc-boot/GsymbolKey.c: Rebuild.
* mc-boot/Gtop.c: Rebuild.
* mc-boot/Gvarargs.c: Rebuild.
* mc-boot/Gwlists.c: Rebuild.
* mc-boot/GRTentity.h: New file.
* mc/decl.mod (scaffoldStatic): Change _finish to _fini.
* mc/mc.flex (_M2_mcflex_fini): New function.
(_M2_mcflex_finish): Remove function.
* tools-src/mklink.c (GenerateFinishCalls): Change
_finish to _fini.
(GeneratePrototypes): Change _finish to _fini.

libgm2/ChangeLog:

* libm2cor/Makefile.am (libm2cor_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2cor/Makefile.in: Rebuild.
* libm2iso/Makefile.am (libm2iso_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2iso/Makefile.in: Rebuild.
* libm2log/Makefile.am (libm2log_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2log/Makefile.in: Rebuild.
* libm2pim/Makefile.am (libm2pim_la_M2FLAGS): Add -Wreturn-type
-fcase.
* libm2pim/Makefile.in: Rebuild.

PR modula2/108612
PR modula2/108551

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
111 files changed:
gcc/m2/Make-lang.in
gcc/m2/Make-maintainer.in
gcc/m2/gm2-compiler/M2ALU.mod
gcc/m2/gm2-compiler/M2Base.mod
gcc/m2/gm2-compiler/M2GCCDeclare.mod
gcc/m2/gm2-compiler/M2GenGCC.mod
gcc/m2/gm2-compiler/M2Quads.mod
gcc/m2/gm2-compiler/M2System.mod
gcc/m2/gm2-gcc/m2except.cc
gcc/m2/gm2-libs-coroutines/Debug.def
gcc/m2/gm2-libs-coroutines/SYSTEM.def
gcc/m2/gm2-libs-iso/ClientSocket.mod
gcc/m2/gm2-libs-iso/EXCEPTIONS.def
gcc/m2/gm2-libs-iso/IOLink.def
gcc/m2/gm2-libs-iso/M2RTS.def
gcc/m2/gm2-libs-iso/SYSTEM.def
gcc/m2/gm2-libs-iso/TermFile.mod
gcc/m2/gm2-libs-min/M2RTS.def
gcc/m2/gm2-libs/FIO.mod
gcc/m2/gm2-libs/M2RTS.def
gcc/m2/gm2-libs/RTExceptions.def
gcc/m2/gm2-libs/RTExceptions.mod
gcc/m2/gm2-libs/SYSTEM.def
gcc/m2/m2.flex
gcc/m2/mc-boot-ch/GBuiltins.c
gcc/m2/mc-boot-ch/GRTco.c
gcc/m2/mc-boot-ch/GSYSTEM.c
gcc/m2/mc-boot-ch/GSelective.c
gcc/m2/mc-boot-ch/GSysExceptions.c
gcc/m2/mc-boot-ch/GUnixArgs.cc
gcc/m2/mc-boot-ch/Gdtoa.c
gcc/m2/mc-boot-ch/Gerrno.c
gcc/m2/mc-boot-ch/Gldtoa.c
gcc/m2/mc-boot-ch/Gtermios.cc
gcc/m2/mc-boot-ch/Gwrapc.c
gcc/m2/mc-boot/GASCII.c
gcc/m2/mc-boot/GArgs.c
gcc/m2/mc-boot/GAssertion.c
gcc/m2/mc-boot/GBreak.c
gcc/m2/mc-boot/GCmdArgs.c
gcc/m2/mc-boot/GDebug.c
gcc/m2/mc-boot/GDynamicStrings.c
gcc/m2/mc-boot/GEnvironment.c
gcc/m2/mc-boot/GFIO.c
gcc/m2/mc-boot/GFormatStrings.c
gcc/m2/mc-boot/GFpuIO.c
gcc/m2/mc-boot/GIO.c
gcc/m2/mc-boot/GIndexing.c
gcc/m2/mc-boot/GM2Dependent.c
gcc/m2/mc-boot/GM2EXCEPTION.c
gcc/m2/mc-boot/GM2RTS.c
gcc/m2/mc-boot/GM2RTS.h
gcc/m2/mc-boot/GMemUtils.c
gcc/m2/mc-boot/GNumberIO.c
gcc/m2/mc-boot/GPushBackInput.c
gcc/m2/mc-boot/GRTExceptions.c
gcc/m2/mc-boot/GRTExceptions.h
gcc/m2/mc-boot/GRTco.h
gcc/m2/mc-boot/GRTentity.h [new file with mode: 0644]
gcc/m2/mc-boot/GRTint.c
gcc/m2/mc-boot/GSArgs.c
gcc/m2/mc-boot/GSFIO.c
gcc/m2/mc-boot/GStdIO.c
gcc/m2/mc-boot/GStorage.c
gcc/m2/mc-boot/GStrCase.c
gcc/m2/mc-boot/GStrIO.c
gcc/m2/mc-boot/GStrLib.c
gcc/m2/mc-boot/GStringConvert.c
gcc/m2/mc-boot/GSysStorage.c
gcc/m2/mc-boot/GTimeString.c
gcc/m2/mc-boot/Galists.c
gcc/m2/mc-boot/Gdecl.c
gcc/m2/mc-boot/Gkeyc.c
gcc/m2/mc-boot/Glists.c
gcc/m2/mc-boot/GmcComment.c
gcc/m2/mc-boot/GmcComp.c
gcc/m2/mc-boot/GmcDebug.c
gcc/m2/mc-boot/GmcError.c
gcc/m2/mc-boot/GmcFileName.c
gcc/m2/mc-boot/GmcLexBuf.c
gcc/m2/mc-boot/GmcMetaError.c
gcc/m2/mc-boot/GmcOptions.c
gcc/m2/mc-boot/GmcPreprocess.c
gcc/m2/mc-boot/GmcPretty.c
gcc/m2/mc-boot/GmcPrintf.c
gcc/m2/mc-boot/GmcQuiet.c
gcc/m2/mc-boot/GmcReserved.c
gcc/m2/mc-boot/GmcSearch.c
gcc/m2/mc-boot/GmcStack.c
gcc/m2/mc-boot/GmcStream.c
gcc/m2/mc-boot/Gmcp1.c
gcc/m2/mc-boot/Gmcp2.c
gcc/m2/mc-boot/Gmcp3.c
gcc/m2/mc-boot/Gmcp4.c
gcc/m2/mc-boot/Gmcp5.c
gcc/m2/mc-boot/GnameKey.c
gcc/m2/mc-boot/GsymbolKey.c
gcc/m2/mc-boot/Gtop.c
gcc/m2/mc-boot/Gvarargs.c
gcc/m2/mc-boot/Gwlists.c
gcc/m2/mc/decl.mod
gcc/m2/mc/mc.flex
gcc/m2/tools-src/mklink.c
libgm2/libm2cor/Makefile.am
libgm2/libm2cor/Makefile.in
libgm2/libm2iso/Makefile.am
libgm2/libm2iso/Makefile.in
libgm2/libm2log/Makefile.am
libgm2/libm2log/Makefile.in
libgm2/libm2pim/Makefile.am
libgm2/libm2pim/Makefile.in

index 03677d9e5eac69fb6b2bf3b29a4ff80b5a1a8b55..47a5b2f07591b6f0b073a6d35e8b84a51b07748f 100644 (file)
@@ -441,11 +441,14 @@ GM2_G=-g -fm2-g
 GM2_CPP=
 # GM2_DEBUG_STRMEM=-fcpp
 GM2_DEBUG_STRMEM=
-GM2_FLAGS=-Wunused-variable -fsoft-check-all $(GM2_G) $(GM2_O) \
+GM2_FLAGS=-Wunused-variable -fsoft-check-all \
+ -fno-return -Wreturn-type \
+ $(GM2_G) $(GM2_O) \
  -funbounded-by-reference -fpim -fextended-opaque \
  -Wpedantic-cast -Wpedantic-param-names -ffunction-sections \
  -fdata-sections $(GM2_CPP) # -fauto-init
 GM2_ISO_FLAGS=-fsoft-check-all $(GM2_G) $(GM2_O) \
+ -fno-return -Wreturn-type \
  -funbounded-by-reference -fiso -fextended-opaque \
  -Wpedantic-cast -Wpedantic-param-names -ffunction-sections \
  -fdata-sections $(GM2_CPP)
@@ -1138,6 +1141,7 @@ MC-LIB-DEFS = \
    PushBackInput.def \
    RTExceptions.def \
    RTco.def \
+   RTentity.def \
    RTint.def \
    SArgs.def \
    SFIO.def \
index fdb0758add784a34e77196b50b0eae9633f7b43b..d2339b370f2da4e2d7f8dd5d22ba2149a9f9b050 100644 (file)
@@ -410,7 +410,7 @@ MCLINK=-g     # use -g -fmodules -c if you are debugging and wish to see missing
 # version of mc.  We need a working Modula-2 compiler to run mc-maintainer.
 
 GM2SYS=${HOME}/opt/lib/gcc/x86_64-pc-linux-gnu/12.0.0/m2/m2pim
-GM2PATH=$(srcdir)/m2/mc:$(GM2SYS):$(srcdir)/m2:m2/gm2-auto:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso
+GM2PATH=-I$(srcdir)/m2/mc -I$(GM2SYS) -I$(srcdir)/m2 -Im2/gm2-auto -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso
 
 mc: mc-clean mc-devel
 
@@ -483,36 +483,36 @@ m2/boot-bin/mc-devel$(exeext): m2/mc-obj/mcp1.mod \
        $(RM) -rf mc-obj
        $(mkinstalldirs) mc-obj
        $(CC) -I$(srcdir)/m2/mc -c -g mcflex.c -o mc-obj/mcflex.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/decl.mod -o mc-obj/decl.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcStream.mod -o mc-obj/mcStream.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcPretty.mod -o mc-obj/mcPretty.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcStack.mod -o mc-obj/mcStack.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/varargs.mod -o mc-obj/varargs.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcMetaError.mod -o mc-obj/mcMetaError.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcOptions.mod -o mc-obj/mcOptions.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcComp.mod -o mc-obj/mcComp.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp1.mod -o mc-obj/mcp1.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp2.mod -o mc-obj/mcp2.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp3.mod -o mc-obj/mcp3.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp4.mod -o mc-obj/mcp4.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp5.mod -o mc-obj/mcp5.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/wlists.mod -o mc-obj/wlists.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/alists.mod -o mc-obj/alists.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/symbolKey.mod -o mc-obj/symbolKey.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcReserved.mod -o mc-obj/mcReserved.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/nameKey.mod -o mc-obj/nameKey.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcSearch.mod -o mc-obj/mcSearch.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcFileName.mod -o mc-obj/mcFileName.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcLexBuf.mod -o mc-obj/mcLexBuf.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcQuiet.mod -o mc-obj/mcQuiet.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcError.mod -o mc-obj/mcError.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcDebug.mod -o mc-obj/mcDebug.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcPrintf.mod -o mc-obj/mcPrintf.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/Indexing.mod -o mc-obj/Indexing.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcPreprocess.mod -o mc-obj/mcPreprocess.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/keyc.mod -o mc-obj/keyc.o
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcComment.mod -o mc-obj/mcComment.o
-       $(BOOTGM2) $(MCLINK) -I. -fscaffold-main -I$(GM2PATH) \
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/decl.mod -o mc-obj/decl.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcStream.mod -o mc-obj/mcStream.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcPretty.mod -o mc-obj/mcPretty.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcStack.mod -o mc-obj/mcStack.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/varargs.mod -o mc-obj/varargs.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcMetaError.mod -o mc-obj/mcMetaError.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcOptions.mod -o mc-obj/mcOptions.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcComp.mod -o mc-obj/mcComp.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) m2/mc-obj/mcp1.mod -o mc-obj/mcp1.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) m2/mc-obj/mcp2.mod -o mc-obj/mcp2.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) m2/mc-obj/mcp3.mod -o mc-obj/mcp3.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) m2/mc-obj/mcp4.mod -o mc-obj/mcp4.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) m2/mc-obj/mcp5.mod -o mc-obj/mcp5.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/wlists.mod -o mc-obj/wlists.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/alists.mod -o mc-obj/alists.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/symbolKey.mod -o mc-obj/symbolKey.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcReserved.mod -o mc-obj/mcReserved.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/nameKey.mod -o mc-obj/nameKey.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcSearch.mod -o mc-obj/mcSearch.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcFileName.mod -o mc-obj/mcFileName.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcLexBuf.mod -o mc-obj/mcLexBuf.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcQuiet.mod -o mc-obj/mcQuiet.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcError.mod -o mc-obj/mcError.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcDebug.mod -o mc-obj/mcDebug.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcPrintf.mod -o mc-obj/mcPrintf.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/Indexing.mod -o mc-obj/Indexing.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcPreprocess.mod -o mc-obj/mcPreprocess.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/keyc.mod -o mc-obj/keyc.o
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) $(srcdir)/m2/mc/mcComment.mod -o mc-obj/mcComment.o
+       $(BOOTGM2) $(MCLINK) -I. -fscaffold-static -fscaffold-main $(GM2PATH) \
             -fuse-list=$(srcdir)/m2/init/mcinit $(srcdir)/m2/mc/top.mod -o mc \
             m2/gm2-libs-boot/RTcodummy.o \
             m2/gm2-libs-boot/dtoa.o m2/gm2-libs-boot/ldtoa.o mc-obj/*o m2/mc-boot-ch/Gabort.o
@@ -525,11 +525,11 @@ m2/boot-bin/mc-opt$(exeext): m2/mc-obj/mcp1.mod \
                              mcflex.c
        -test -d m2/boot-bin || $(mkinstalldirs) m2/boot-bin
        g++ -I$(srcdir)/m2/mc -c -g mcflex.c
-       $(BOOTGM2) -fsources -fm2-whole-program -g -I$(srcdir)/m2/mc:$(objdir)/m2/mc-obj:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/mc $(srcdir)/m2/mc/top.mod
+       $(BOOTGM2) -fsources -fm2-whole-program -g -I$(srcdir)/m2/mc:$(objdir)/m2/mc-obj -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/mc $(srcdir)/m2/mc/top.mod
 
 m2/mc/decl.o:  $(srcdir)/m2/mc/decl.mod
        -test -d m2/mc || $(mkinstalldirs) m2/mc
-       $(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) -o $@ $(srcdir)/m2/mc/decl.mod
+       $(BOOTGM2) $(MCOPTIONS) $(GM2PATH) -o $@ $(srcdir)/m2/mc/decl.mod
 
 m2/mc-obj/%.mod: $(srcdir)/m2/mc/%.bnf $(PGE)
        -test -d m2/mc-obj || $(mkinstalldirs) m2/mc-obj
@@ -537,8 +537,8 @@ m2/mc-obj/%.mod: $(srcdir)/m2/mc/%.bnf $(PGE)
 
 gm2-bootstrap: mc-devel
        for i in $(srcdir)/m2/gm2-libs/*.def ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs $$i ; done
-       for i in $(srcdir)/m2/gm2-compiler/*.def ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-gcc $$i ; done
-       for i in $(srcdir)/m2/gm2-libs/*.mod ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-gcc $$i ; done
+       for i in $(srcdir)/m2/gm2-compiler/*.def ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-gcc $$i ; done
+       for i in $(srcdir)/m2/gm2-libs/*.mod ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-gcc $$i ; done
 
 
 $(objdir)/plugin:
@@ -571,31 +571,39 @@ MC_OPTIONS = $(MC_COPYRIGHT) --gcc-config-system --olang=c++
 
 m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/mc/%.def
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+
+m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs-iso/%.def
+       -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs/%.def
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 m2/mc-boot-gen/$(SRC_PREFIX)decl.c: $(srcdir)/m2/mc/decl.mod
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) --extended-opaque -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) --extended-opaque -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 m2/mc-boot-gen/$(SRC_PREFIX)%.c: $(srcdir)/m2/mc/%.mod
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 m2/mc-boot-gen/$(SRC_PREFIX)%.c: $(srcdir)/m2/gm2-libs/%.mod
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+
+m2/mc-boot-gen/$(SRC_PREFIX)%.c: $(srcdir)/m2/gm2-libs-iso/%.mod
+       -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs-iso/%.def
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 m2/mc-boot-gen/$(SRC_PREFIX)%.c: m2/mc-obj/%.mod
        -test -d m2/mc-boot-gen || $(mkinstalldirs) m2/mc-boot-gen
-       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
+       ./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
 
 # mc-bootstrap compiles mc using the C version previously generated by mc-autogen.
 # These autogenerated files will be checked into git by the maintainer.
@@ -680,11 +688,11 @@ gm2.verifyparanoid: m2/stage1/cc1gm2$(exeext) m2/m2obj2/cc1gm2$(exeext) m2/m2obj
        @echo "verifying the three generations of GNU Modula-2 compilers - it may take some time.."
        $(QUIAT)for i in $(GM2-VERIFY-MODS) ; do \
            echo -n "$$i " ; \
-           ./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/1.s ; \
+           ./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/1.s ; \
            echo -n "[1]" ; \
-           ./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/2.s ; \
+           ./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/2.s ; \
            echo -n "[2]" ; \
-           ./gm2 -S $(GM2_FLAGS) -c -B./stage3/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/3.s ; \
+           ./gm2 -S $(GM2_FLAGS) -c -B./stage3/m2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/3.s ; \
            echo -n "[3]" ; \
            if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
                echo -n " [stage 1 and stage 2 differ]" ; \
@@ -704,11 +712,11 @@ gm2.verifyparanoid: m2/stage1/cc1gm2$(exeext) m2/m2obj2/cc1gm2$(exeext) m2/m2obj
        $(QUIAT)for i in x $(GM2-VERIFY-AUTO) ; do \
            if [ -f m2/gm2-auto/$$i ] ; then \
               echo -n "$$i " ; \
-              ./gm2 -S $(GM2_FLAGS) -c -B./m2/stage1 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/1.s ; \
+              ./gm2 -S $(GM2_FLAGS) -c -B./m2/stage1 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/1.s ; \
               echo -n "[1]" ; \
-              ./gm2 -S $(GM2_FLAGS) -c -B./m2/m2obj2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/2.s ; \
+              ./gm2 -S $(GM2_FLAGS) -c -B./m2/m2obj2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/2.s ; \
               echo -n "[2]" ; \
-              ./gm2 -S $(GM2_FLAGS) -c -B./m2/m2obj3 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/3.s ; \
+              ./gm2 -S $(GM2_FLAGS) -c -B./m2/m2obj3 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/3.s ; \
               echo -n "[3]" ; \
               if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
                   echo -n " [stage 1 and stage 2 differ]" ; \
@@ -734,9 +742,9 @@ gm2.verifystage12: force m2/stage1/cc1gm2$(exeext) m2/m2obj2/cc1gm2$(exeext)
        @echo "verifying stage1 and stage2 generations of GNU Modula-2 compilers - it may take some time.."
        $(QUIAT)for i in $(GM2-VERIFY-MODS) ; do \
            echo -n "$$i " ; \
-           ./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/1.s ; \
+           ./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/1.s ; \
            echo -n "[1]" ; \
-           ./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/2.s ; \
+           ./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/2.s ; \
            echo -n "[2]" ; \
            if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
                echo -n " [stage 1 and stage 2 differ]" ; \
@@ -750,9 +758,9 @@ gm2.verifystage12: force m2/stage1/cc1gm2$(exeext) m2/m2obj2/cc1gm2$(exeext)
        $(QUIAT)for i in x $(GM2-VERIFY-AUTO) ; do \
            if [ -f m2/gm2-auto/$$i ] ; then \
               echo -n "$$i " ; \
-              ./gm2 -S $(GM2_FLAGS) -c -B./m2/stage1 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/1.s ; \
+              ./gm2 -S $(GM2_FLAGS) -c -B./m2/stage1 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/1.s ; \
               echo -n "[1]" ; \
-              ./gm2 -S $(GM2_FLAGS) -c -B./m2/m2obj2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/2.s ; \
+              ./gm2 -S $(GM2_FLAGS) -c -B./m2/m2obj2 -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/2.s ; \
               echo -n "[2]" ; \
               if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
                   echo -n " [stage 1 and stage 2 differ]" ; \
index 678f31024e5b6503cd06baa535fe4a6609114279..9739c761d643a510a1b6645eed91c07e87158ff6 100644 (file)
@@ -4636,12 +4636,12 @@ BEGIN
                ELSE
                   MetaErrorT2 (tokenno,
                                'the {%1EN} element does not exist in the {%2ad} array declaration used by the compound literal', i, constructorType) ;
-                  RETURN NulSym
                END
             END
          END
       END
-   END
+   END ;
+   RETURN NulSym
 END GetConstructorElement ;
 
 
index 3436d17c3c8121ebe574f0b00f9689fd0cf35a2c..cc3aa4cc961656b095cb6b346f326f909354f0e6 100644 (file)
@@ -33,7 +33,7 @@ IMPLEMENTATION MODULE M2Base ;
 
 FROM DynamicStrings IMPORT InitString, String, Mark, InitStringCharStar, ConCat ;
 FROM M2LexBuf IMPORT BuiltinTokenNo, GetTokenNo ;
-FROM NameKey IMPORT MakeKey, WriteKey, KeyToCharStar ;
+FROM NameKey IMPORT NulName, MakeKey, WriteKey, KeyToCharStar ;
 FROM M2Debug IMPORT Assert ;
 FROM SYSTEM IMPORT WORD ;
 
@@ -74,7 +74,8 @@ FROM SymbolTable IMPORT ModeOfAddr,
                         IsArray, IsProcedure, IsConstString,
                         IsVarient, IsRecordField, IsFieldVarient,
                         GetArraySubscript, IsRecord, NoOfParam,
-                        GetNthParam, IsVarParam, GetNth, GetDimension ;
+                        GetNthParam, IsVarParam, GetNth, GetDimension,
+                        MakeError ;
 
 FROM M2ALU IMPORT PushIntegerTree, PushRealTree, PushCard, Equ, Gre, Less ;
 FROM M2Batch IMPORT MakeDefinitionSource ;
@@ -1044,7 +1045,8 @@ BEGIN
    THEN
       RETURN( RealN(128) )
    ELSE
-      MetaError1('{%1ad} must be a COMPLEX type', sym)
+      MetaError1('{%1ad} must be a COMPLEX type', sym) ;
+      RETURN RType
    END
 END ComplexToScalar ;
 
@@ -1997,7 +1999,8 @@ BEGIN
 
    ELSE
       InternalError ('not expecting this metatype value')
-   END
+   END ;
+   RETURN MakeError (NearTok, NulName)
 END MixMetaTypes ;
 
 
index 445c039a0c24c892b0bebe5b633912b04241077b..ef1859f46e7d8c98898d88a4b4c21bb8d62a2c57 100644 (file)
@@ -5020,7 +5020,8 @@ BEGIN
       RETURN( min )
    ELSIF GetSType(type)=NulSym
    THEN
-      MetaError1('unable to obtain the MIN value for type {%1as}', type)
+      MetaError1('unable to obtain the MIN value for type {%1as}', type) ;
+      RETURN NulSym
    ELSE
       RETURN( GetTypeMin(GetSType(type)) )
    END
@@ -5058,7 +5059,8 @@ BEGIN
       RETURN( max )
    ELSIF GetSType(type)=NulSym
    THEN
-      MetaError1('unable to obtain the MAX value for type {%1as}', type)
+      MetaError1('unable to obtain the MAX value for type {%1as}', type) ;
+      RETURN NulSym
    ELSE
       RETURN( GetTypeMax(GetSType(type)) )
    END
index f32f7ee69e9e3a5d608c89a96fb22f4c0cbedf1b..caca8a3f795012254c62c22f17c72889ea5c630d 100644 (file)
@@ -392,7 +392,7 @@ BEGIN
          END ;
          scope := GetScope(scope)
       END ;
-      Assert (FALSE)
+      InternalError ('expecting scope to eventually reach a module or defimp symbol')
    ELSE
       (* Otherwise it is public if it were exported.  *)
       RETURN IsExported (GetMainModule (), sym)
@@ -1225,13 +1225,15 @@ BEGIN
       END ;
       IF HighField = NulSym
       THEN
-         MetaError1 ('{%EkHIGH} dimension number {%1N} for array does not exist', dim)
+         MetaError1 ('{%EkHIGH} dimension number {%1N} for array does not exist', dim) ;
+         RETURN GetCardinalZero (location)
       ELSE
          (* remainingDim := dim - accessibleDim ;  --fixme-- write tests to stress this code.  *)
          HighTree := BuildHighFromStaticArray (location, (* remainingDim, *) ArrayType) ;
          IF HighTree = NIL
          THEN
-            MetaError1 ('{%EkHIGH} dimension number {%1N} for array does not exist', dim)
+            MetaError1 ('{%EkHIGH} dimension number {%1N} for array does not exist', dim) ;
+            RETURN GetCardinalZero (location)
          END ;
          RETURN HighTree
       END
index 3b6ed4531e9d97ec1681f796824921fc61ca712a..17062b9a278e478c0bc3ac78a88eb10322bbddc2 100644 (file)
@@ -6677,6 +6677,8 @@ BEGIN
    ELSIF IsVar (Sym) OR IsType (Sym)
    THEN
       RETURN GetItemPointedTo (GetSType (Sym))
+   ELSE
+      InternalError ('expecting a pointer or variable symbol')
    END
 END GetItemPointedTo ;
 
@@ -9297,8 +9299,9 @@ BEGIN
    ELSIF GetSType (type) = NulSym
    THEN
       MetaErrorT1 (tok,
-                   'unable to obtain the {%AkMIN} value for type {%1Aad}', type)
+                   'unable to obtain the {%AkMIN} value for type {%1Aad}', type) ;
       (* non recoverable error.  *)
+      InternalError ('MetaErrorT1 {%AkMIN} should call abort')
    ELSE
       RETURN GetTypeMin (tok, func, GetSType (type))
    END
@@ -9334,8 +9337,9 @@ BEGIN
    ELSIF GetSType (type) = NulSym
    THEN
       MetaErrorT1 (tok,
-                   'unable to obtain the {%AkMAX} value for type {%1Aad}', type)
+                   'unable to obtain the {%AkMAX} value for type {%1Aad}', type) ;
       (* non recoverable error.  *)
+      InternalError ('MetaErrorT1 {%AkMAX} should call abort')
    ELSE
       RETURN GetTypeMax (tok, func, GetSType (type))
    END
@@ -9452,7 +9456,7 @@ BEGIN
          MetaErrorT1 (vartok,
                       'parameter to {%AkMAX} must be a type or a variable, seen {%1Aad}',
                       Var)
-         (* non recoverable error.  *)
+         (* non recoverable error.  *) ;
       END
    ELSE
       (* we dont know the type therefore cannot fake a return.  *)
index 8242584c82e966adf1f56689e03bc108df9e5861..4908578fd50730b45584a689339b6d06335bf36f 100644 (file)
@@ -47,6 +47,7 @@ FROM SymbolTable IMPORT NulSym,
                        PutSet, PutVar,
                        PutSubrange,
                         PutExportQualified,
+                        PutProcedureNoReturn,
                         GetSym, GetSymName,
                         GetCurrentModule, SetCurrentModule,
                         IsLegal,
@@ -418,6 +419,7 @@ BEGIN
 
    Throw := MakeProcedure(BuiltinTokenNo,
                           MakeKey('THROW')) ;       (* Procedure       *)
+   PutProcedureNoReturn (Throw, TRUE) ;
 
    CreateMinMaxFor(Word, 'MinWord', 'MaxWord', GetWordType()) ;
    CreateMinMaxFor(Address, 'MinAddress', 'MaxAddress', GetPointerType()) ;
index ab7df80455898a1af74961fb430adb9fb2b06662..b3cd65151730b53f2c53b5e2f6cf375801f58056 100644 (file)
@@ -132,13 +132,13 @@ m2except_InitExceptions (location_t location)
   m2decl_BuildParameterDeclaration (location, NULL, ptr_type_node, FALSE);
   fn_throw_tree = m2decl_BuildEndFunctionDeclaration (
       location, location, "__cxa_throw", void_type_node, TRUE, FALSE, TRUE,
-      FALSE);
+      TRUE);
 
   /* Declare void __cxa_rethrow (void).  */
   m2decl_BuildStartFunctionDeclaration (FALSE);
   fn_rethrow_tree = m2decl_BuildEndFunctionDeclaration (
      location, location, "__cxa_rethrow", void_type_node, TRUE, FALSE, TRUE,
-     FALSE);
+     TRUE);
 
   /* Declare void *__cxa_allocate_exception (size_t).  */
   m2decl_BuildStartFunctionDeclaration (FALSE);
@@ -417,7 +417,7 @@ gm2_build_throw (location_t location, tree exp)
       exp = build2 (COMPOUND_EXPR, TREE_TYPE (exp), allocate_expr, exp);
 
       /* Force all the cleanups to be evaluated here so that we don't have
-      to do them during unwinding.  */
+        to do them during unwinding.  */
       exp = build1 (CLEANUP_POINT_EXPR, void_type_node, exp);
 
       tmp = do_throw (location, ptr);
index 58edecfea344294a683993f09375231fd659a7db..a4f5b68b3241869269a56bda265bd77da0db4a09 100644 (file)
@@ -51,7 +51,7 @@ TYPE
 PROCEDURE Halt (File    : ARRAY OF CHAR;
                 LineNo  : CARDINAL;
                 Function,
-                Message : ARRAY OF CHAR) ;
+                Message : ARRAY OF CHAR) <* noreturn *> ;
 
 
 (*
index 3b48434168054ba9c57bae7b5c8e61ab2beb6f90..5a66d20b9cf6304582653c1efad9f725c2ae0bb5 100644 (file)
@@ -171,7 +171,7 @@ PROCEDURE SHIFT (val: <a set type>;
      num is negative, otherwise the direction is up.
   *)
 
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
   (*
      THROW is a GNU extension and was not part of the PIM or ISO
      standards.  It throws an exception which will be caught by the EXCEPT
index 5de118c1026a3262858d4abf54f0af069fbf9607..15a194da587ca86182cdfac7ad35414c1fe097d9 100644 (file)
@@ -224,13 +224,20 @@ BEGIN
             actual := 0 ;
             RETURN( FALSE )
          END
+      ELSE
+         RETURN( FALSE )
       END
    END
 END dorbytes ;
 
 
 (*
-   dowbytes -
+   dowbytes - attempts to write out nBytes.  The actual
+              number of bytes written are returned.
+              If the actual number of bytes written is >= 0 then
+              the return result will be true.  Failure to
+              write any bytes results in returning FALSE
+              errno set and the actual will be set to zero.
 *)
 
 PROCEDURE dowbytes (g: GenDevIF; d: DeviceTablePtr;
index 40d6aa59a31bc7b2ca356600008df28356086ccf..d037b7e6877bc1c46fbddbfce122696976583fe8 100644 (file)
@@ -25,7 +25,8 @@ PROCEDURE AllocateSource(VAR newSource: ExceptionSource);
   (* Allocates a unique value of type ExceptionSource *)
 
 PROCEDURE RAISE (source: ExceptionSource;
-                 number: ExceptionNumber; message: ARRAY OF CHAR);
+                 number: ExceptionNumber; message: ARRAY OF CHAR)
+                 <* noreturn *> ;
   (* Associates the given values of source, number and message with
      the current context and raises an exception.
   *)
index f8c4c36cce4982588cbee9c60fc3a1f72ef8c658..cae594b8a4bb7640486d0b0a3a45355d28d00854 100644 (file)
@@ -120,7 +120,7 @@ TYPE
 *)
 
 PROCEDURE RAISEdevException (cid: IOChan.ChanId; did: DeviceId;
-                             x: DevExceptionRange; s: ARRAY OF CHAR);
+                             x: DevExceptionRange; s: ARRAY OF CHAR) <* noreturn *> ;
 
   (* If the device module identified by did is not the module that made the channel
      identified by cid, the exception wrongDevice is raised; otherwise the given exception
@@ -134,7 +134,7 @@ PROCEDURE IsIOException () : BOOLEAN;
   *)
 
 PROCEDURE IOException () : IOChan.ChanExceptions;
-  (* If the current coroutine is in the exceptional execution state because of the 
+  (* If the current coroutine is in the exceptional execution state because of the
      raising af an exception from ChanExceptions, returns the corresponding
      enumeration value, and otherwise raises an exception.
   *)
index 6958fd416675553a858bab5905e8f519cf39be98..cca4ae641897d762fce83568bb233ac629dcc8d8 100644 (file)
@@ -106,7 +106,7 @@ PROCEDURE InstallInitialProcedure (p: PROC) : BOOLEAN ;
           then calling HALT with no parameter.
 *)
 
-PROCEDURE HALT ([exitcode: INTEGER = -1]) ;
+PROCEDURE HALT ([exitcode: INTEGER = -1]) <* noreturn *> ;
 
 
 (*
@@ -116,7 +116,8 @@ PROCEDURE HALT ([exitcode: INTEGER = -1]) ;
 *)
 
 PROCEDURE Halt (filename: ARRAY OF CHAR; line: CARDINAL;
-                function: ARRAY OF CHAR; description: ARRAY OF CHAR) ;
+                function: ARRAY OF CHAR; description: ARRAY OF CHAR)
+                <* noreturn *> ;
 
 
 (*
@@ -126,7 +127,7 @@ PROCEDURE Halt (filename: ARRAY OF CHAR; line: CARDINAL;
 *)
 
 PROCEDURE HaltC (filename: ADDRESS; line: CARDINAL;
-                 function, description: ADDRESS) ;
+                 function, description: ADDRESS) <* noreturn *> ;
 
 
 (*
@@ -143,7 +144,7 @@ PROCEDURE ExitOnHalt (e: INTEGER) ;
 PROCEDURE ErrorMessage (message: ARRAY OF CHAR;
                         filename: ARRAY OF CHAR;
                         line: CARDINAL;
-                        function: ARRAY OF CHAR) ;
+                        function: ARRAY OF CHAR) <* noreturn *> ;
 
 
 (*
@@ -175,30 +176,30 @@ PROCEDURE Length (a: ARRAY OF CHAR) : CARDINAL ;
    The following are the runtime exception handler routines.
 *)
 
-PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
 
 
 END M2RTS.
index 716793b706fe3c85960b81599ed7aceb65b7eca7..f25fc6ff3a297cf446397fee383c34a1d9c6c731 100644 (file)
@@ -133,7 +133,7 @@ PROCEDURE TSIZE (<type>; ... ): CARDINAL;
      are used to distinguish variants in a variant record.
   *)
 
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
   (*
      THROW is a GNU extension and was not part of the PIM or ISO
      standards.  It throws an exception which will be caught by the
index 42ea5501c9a9df3bed543791d7d391f34a4a4048..95090c0ecd82528e9aeeaf76567e4f10a94055e6 100644 (file)
@@ -325,12 +325,18 @@ BEGIN
             RETURN( FALSE )
          END
       END
-   END
+   END ;
+   RETURN( FALSE )
 END dorbytes ;
 
 
 (*
-   dowbytes - 
+   dowbytes - attempts to write out nBytes.  The actual
+              number of bytes written are returned.
+              If the actual number of bytes written is >= 0 then
+              the return result will be true.  Failure to
+              write any bytes results in returning FALSE
+              errno set and the actual will be set to zero.
 *)
 
 PROCEDURE dowbytes (g: GenDevIF; d: DeviceTablePtr;
@@ -453,7 +459,7 @@ END freeData ;
 
 
 (*
-   handlefree - 
+   handlefree -
 *)
 
 PROCEDURE handlefree (d: DeviceTablePtr) ;
@@ -519,7 +525,7 @@ END termOpen ;
 
 
 (*
-   RestoreTerminalSettings - 
+   RestoreTerminalSettings -
 *)
 
 PROCEDURE RestoreTerminalSettings (cid: ChanId) ;
@@ -616,7 +622,7 @@ END Close ;
 
 
 (*
-   Init - 
+   Init -
 *)
 
 PROCEDURE Init ;
index db8c5ae4f638f0cbb48a9cc50a281bb3742ee0c2..65ffa8c53678663c1056d81e19e1193130d63932 100644 (file)
@@ -48,7 +48,7 @@ PROCEDURE RegisterModule (name: ADDRESS;
 PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
 PROCEDURE ExecuteTerminationProcedures ;
 PROCEDURE ExecuteInitialProcedures ;
-PROCEDURE HALT ;
+PROCEDURE HALT <* noreturn *> ;
 PROCEDURE NoException (filename: ADDRESS;
                        line, column: CARDINAL; scope, message: ADDRESS) ;
 
index 79435d739cc82dd25251794de5adbb46d7166819..94a183301c3928be0eb3354c58f6c70a8eca53b9 100644 (file)
@@ -738,14 +738,11 @@ BEGIN
                   END
                END ;
                RETURN( total )
-            ELSE
-               RETURN( -1 )
             END
          END
       END
-   ELSE
-      RETURN( -1 )
-   END
+   END ;
+   RETURN( -1 )
 END BufferedRead ;
 
 
@@ -1606,7 +1603,8 @@ BEGIN
       ELSE
          RETURN fd^.name.address
       END
-   END
+   END ;
+   RETURN NIL
 END getFileName ;
 
 
@@ -1628,7 +1626,8 @@ BEGIN
       ELSE
          RETURN fd^.name.size
       END
-   END
+   END ;
+   RETURN 0
 END getFileNameLength ;
 
 
index b551725126e005682c876237b96fb47936b2496e..167f96423e2a4a8ed39e47168ac6977c582a6678 100644 (file)
@@ -136,7 +136,7 @@ PROCEDURE Halt (filename: ARRAY OF CHAR; line: CARDINAL;
 *)
 
 PROCEDURE HaltC (filename: ADDRESS; line: CARDINAL;
-                 function, description: ADDRESS) ;
+                 function, description: ADDRESS) <* noreturn *> ;
 
 
 (*
@@ -169,30 +169,30 @@ PROCEDURE Length (a: ARRAY OF CHAR) : CARDINAL ;
    The following are the runtime exception handler routines.
 *)
 
-PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
-PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
+PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
 
 
 END M2RTS.
index 71d869045189cb4a2e0b6a50ea0aa5e13fc2c246..7d3b58d561804ef3795bbbf05af903efb7f33992 100644 (file)
@@ -56,7 +56,7 @@ TYPE
 PROCEDURE Raise (number: CARDINAL;
                  file: ADDRESS; line: CARDINAL;
                  column: CARDINAL; function: ADDRESS;
-                 message: ADDRESS) ;
+                 message: ADDRESS) <* noreturn *> ;
 
 
 (*
index 1b725c6dac86ffabeab870a489eb8b2121c00590..8d3dc04ff0f225f5387cd1c0ced4733d6f66719f 100644 (file)
@@ -125,16 +125,17 @@ END findHandler ;
                    exception in the active EHB.
 *)
 
-PROCEDURE InvokeHandler ;
+PROCEDURE InvokeHandler  <* noreturn *> ;
 VAR
    h: Handler ;
 BEGIN
-   h := findHandler(currentEHB, currentEHB^.number) ;
+   h := findHandler (currentEHB, currentEHB^.number) ;
    IF h=NIL
    THEN
-      THROW(GetNumber(GetExceptionBlock()))
+      THROW (GetNumber (GetExceptionBlock ()))
    ELSE
-      h^.p
+      h^.p ;
+      HALT
    END
 END InvokeHandler ;
 
@@ -151,7 +152,7 @@ VAR
    n: INTEGER ;
 BEGIN
    e := GetExceptionBlock() ;
-   n := write(2, GetTextBuffer(e), strlen(GetTextBuffer(e))) ;
+   n := write (2, GetTextBuffer (e), strlen (GetTextBuffer (e))) ;
    HALT
 END DefaultErrorCatch ;
 
@@ -162,7 +163,7 @@ END DefaultErrorCatch ;
 
 PROCEDURE DoThrow ;
 BEGIN
-   THROW(GetNumber(GetExceptionBlock()))
+   THROW (GetNumber (GetExceptionBlock ()))
 END DoThrow ;
 
 
@@ -179,7 +180,7 @@ VAR
    i: M2EXCEPTION.M2Exceptions ;
 BEGIN
    FOR i := MIN(M2EXCEPTION.M2Exceptions) TO MAX(M2EXCEPTION.M2Exceptions) DO
-      PushHandler(GetExceptionBlock(), VAL(CARDINAL, i), DoThrow)
+      PushHandler (GetExceptionBlock (), VAL (CARDINAL, i), DoThrow)
    END
 END BaseExceptionsThrow ;
 
index 068086aa688627791e36f27054b97f19f6a449fa..2f72ad1718c311882f780ce99615c61b5290b041 100644 (file)
@@ -89,7 +89,7 @@ PROCEDURE SHIFT (val: <a set type>;
      num is negative, otherwise the direction is up/left.
   *)
 
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
   (*
      THROW is a GNU extension and was not part of the PIM or ISO
      standards.  It throws an exception which will be caught by the
index 2937290635c5b9906422775a86766dbe7656a218..198088beeffa05d348cdf46b37e15296acdc01ac 100644 (file)
@@ -826,4 +826,4 @@ int yywrap (void)
 }
 
 EXTERN void _M2_m2flex_init (void) {}
-EXTERN void _M2_m2flex_finish (void) {}
+EXTERN void _M2_m2flex_fini (void) {}
index 30b07e3a9c26de23eda8950f6b96658ae9773413..28a41c0427ade7e2fedf297cdeccc2bee7bd5c50 100644 (file)
@@ -38,6 +38,6 @@ _M2_Builtins_init (void)
 
 EXTERN
 void
-_M2_Builtins_finish (void)
+_M2_Builtins_fini (void)
 {
 }
index 6365d5ee0b145b3ee7dc619fdca03c8ba805e6f0..cb6f5152f5ade8ad028b9208b87d04f57ce3a91c 100644 (file)
@@ -122,6 +122,6 @@ _M2_RTco_init (void)
 
 EXTERN
 void
-_M2_RTco_finish (void)
+_M2_RTco_fini (void)
 {
 }
index 8b42999fea5f9eba23f903dc13159ce3c5b9932e..dc63f700f4b146121314060823cac746d1d0ae55 100644 (file)
@@ -33,6 +33,6 @@ _M2_SYSTEM_init (int argc, char *p)
 
 EXTERN
 void
-_M2_SYSTEM_finish (int argc, char *p)
+_M2_SYSTEM_fini (int argc, char *p)
 {
 }
index cf8b541ec40912cc9818cd6600aaff7ad4d2042f..e41e848986d037eb0fd247ab60582065b5894445 100644 (file)
@@ -270,6 +270,6 @@ _M2_Selective_init ()
 
 EXTERN
 void
-_M2_Selective_finish ()
+_M2_Selective_fini ()
 {
 }
index 946700963868b0908df9da543cdb98ef250ae862..d39827e76235a23d906f976e23bcf6da90d90267 100644 (file)
@@ -226,12 +226,12 @@ SysExceptions_InitExceptionHandlers (void *indexf, void *range, void *casef,
 
 EXTERN
 void
-_M2_SysExceptions_init (void)
+_M2_SysExceptions_init (int argc, char *argv[], char *envp[])
 {
 }
 
 EXTERN
 void
-_M2_SysExceptions_finish (void)
+_M2_SysExceptions_fini (int argc, char *argv[], char *envp[])
 {
 }
index 4cd5d3ceef5ce25a4b7c061b3b842b9837b8b95a..29b8ec273232316ed9b5622c9963fc94053ba94f 100644 (file)
@@ -73,7 +73,7 @@ _M2_UnixArgs_init (int argc, char *argv[], char *envp[])
 }
 
 extern "C" void
-_M2_UnixArgs_finish (int argc, char *argv[], char *envp[])
+_M2_UnixArgs_fini (int argc, char *argv[], char *envp[])
 {
 }
 
@@ -86,6 +86,6 @@ struct _M2_UnixArgs_ctor { _M2_UnixArgs_ctor (); } _M2_UnixArgs_ctor;
 
 _M2_UnixArgs_ctor::_M2_UnixArgs_ctor (void)
 {
-  M2RTS_RegisterModule ("UnixArgs", _M2_UnixArgs_init, _M2_UnixArgs_finish,
+  M2RTS_RegisterModule ("UnixArgs", _M2_UnixArgs_init, _M2_UnixArgs_fini,
                        _M2_UnixArgs_dep);
 }
index a400bf80f7bba7aa2d4cf04f44272fd3d1d0f1b8..77a7ae50e020576149128e1b6ebd9f286b49fe73 100644 (file)
@@ -174,7 +174,7 @@ _M2_dtoa_init (void)
 }
 
 void
-_M2_dtoa_finish (void)
+_M2_dtoa_fini (void)
 {
 }
 #endif
index 26756f6780856df893e1ced30e66f7837a9e9a4a..c65c48630afce3e388aab42999dacef69c833094 100644 (file)
@@ -45,7 +45,7 @@ _M2_errno_init (int argc, char *p)
 /* finish deconstructor for the module.  */
 
 void
-_M2_errno_finish (int argc, char *p)
+_M2_errno_fini (int argc, char *p)
 {
 }
 
index 7c69535f38f655f6ccdcae471d58c3fa4c79492c..a918cfc2d67bdd729a9104ce613ffceb4e4b4fcb 100644 (file)
@@ -99,7 +99,7 @@ _M2_ldtoa_init (void)
 }
 
 void
-_M2_ldtoa_finish (void)
+_M2_ldtoa_fini (void)
 {
 }
 #   ifdef __cplusplus
index 952270894b49ffcf9003decc3a29444d34c7735a..e6f6ac898b308fbc0fd5c544c46a79e80ae1cb20 100644 (file)
@@ -1933,12 +1933,12 @@ EXPORT (SetChar) (struct termios *t, ControlChar c, char ch)
 }
 
 void
-_M2_termios_init (void)
+_M2_termios_init (int argc, char *argv[], char *envp[])
 {
 }
 
 void
-_M2_termios_finish (void)
+_M2_termios_fini (int argc, char *argv[], char *envp[])
 {
 }
 
index 7c3a431f856c15a5a568fa603c2db0bb1e763169..5753f5db8e28ba7d488d5503d13de84a185694ef 100644 (file)
@@ -167,14 +167,14 @@ wrapc_signbitf (float r)
 /* init constructor for the module.  */
 
 void
-_M2_wrapc_init ()
+_M2_wrapc_init (int argc, char *argv[], char *envp[])
 {
 }
 
 /* finish deconstructor for the module.  */
 
 void
-_M2_wrapc_finish ()
+_M2_wrapc_fini (int argc, char *argv[], char *envp[])
 {
 }
 
index 0878561cd31ecb265a40e4070789c7277fbe7c6e..2f768ce24c816040e6031ce9b5d39d772e1b52cb 100644 (file)
@@ -81,6 +81,6 @@ extern "C" void _M2_ASCII_init (__attribute__((unused)) int argc,__attribute__((
 {
 }
 
-extern "C" void _M2_ASCII_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_ASCII_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index bcb1b1323653cfd68e1951c00e028401cb0414ea..106ddfd30c6e2671b123ffb7a39ca9f6c61469a1 100644 (file)
@@ -115,6 +115,6 @@ extern "C" void _M2_Args_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_Args_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Args_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index f8d4897517d78b267f464116976cf0bc37408ca1..21ee6c0b2f24c9cc489b802c6590a14cdb3332af 100644 (file)
@@ -66,6 +66,6 @@ extern "C" void _M2_Assertion_init (__attribute__((unused)) int argc,__attribute
 {
 }
 
-extern "C" void _M2_Assertion_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Assertion_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 44e1e6f0eb8c58b65c2a4cd966ef782afd583183..9be003bd619cf505cb4958b45f195e10c20e19b1 100644 (file)
@@ -42,6 +42,6 @@ extern "C" void _M2_Break_init (__attribute__((unused)) int argc,__attribute__((
 {
 }
 
-extern "C" void _M2_Break_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Break_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index d5d62e52400b5ee61f581ff68ca800d3511ace8c..c304a4071825e8dd508c62108f47dc6d3d80824b 100644 (file)
@@ -317,6 +317,6 @@ extern "C" void _M2_CmdArgs_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_CmdArgs_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_CmdArgs_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 26d9b8c0dda636428e0ebd370e9a0261f2a69156..6329abb11b1665a1043c38f838d927169e6259e8 100644 (file)
@@ -163,6 +163,6 @@ extern "C" void _M2_Debug_init (__attribute__((unused)) int argc,__attribute__((
 {
 }
 
-extern "C" void _M2_Debug_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Debug_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index a28b641c47a13083296ff5e6d1ec25bfa233d9b4..dfc163646bb212794a0fc48e51b3f5666410b52d 100644 (file)
@@ -2671,6 +2671,6 @@ extern "C" void _M2_DynamicStrings_init (__attribute__((unused)) int argc,__attr
   Init ();
 }
 
-extern "C" void _M2_DynamicStrings_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_DynamicStrings_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index fb1fb8cdd4bb4e92d8701d07255bbe73ac3c7a7d..aa5e76628730125f277762e90c2646cbcb28de44 100644 (file)
@@ -124,6 +124,6 @@ extern "C" void _M2_Environment_init (__attribute__((unused)) int argc,__attribu
 {
 }
 
-extern "C" void _M2_Environment_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Environment_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 74cd8580cf51c20e164a96574cf7bd2ca234039d..1ae6bb63f20073a3984cf844ac534b1a33d12c5d 100644 (file)
@@ -2322,7 +2322,7 @@ extern "C" void _M2_FIO_init (__attribute__((unused)) int argc,__attribute__((un
   Init ();
 }
 
-extern "C" void _M2_FIO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_FIO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
   FIO_FlushOutErr ();
 }
index 7710c8aae4236d22bb146057c97d138442fcedaa..78e7a5a559c52b2036cee839a5e134bdf4322d76 100644 (file)
@@ -840,6 +840,6 @@ extern "C" void _M2_FormatStrings_init (__attribute__((unused)) int argc,__attri
 {
 }
 
-extern "C" void _M2_FormatStrings_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_FormatStrings_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 8265df11aa238c20663e68efe3e0d46b97114307..205c27b811e146dd74d061788a942bca71849207 100644 (file)
@@ -331,6 +331,6 @@ extern "C" void _M2_FpuIO_init (__attribute__((unused)) int argc,__attribute__((
 {
 }
 
-extern "C" void _M2_FpuIO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_FpuIO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index ad13f97fc38ab5b600a3f022257634261db7cd9d..e56c74382f535ae09885161c77f412eb26483cef 100644 (file)
@@ -474,6 +474,6 @@ extern "C" void _M2_IO_init (__attribute__((unused)) int argc,__attribute__((unu
   Init ();
 }
 
-extern "C" void _M2_IO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_IO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index c809e4b9b6e0acf0fc8071b77c38da562d29d276..0817ff36ca258e57ffb27a8edf5e2dcf04628fcc 100644 (file)
@@ -486,6 +486,6 @@ extern "C" void _M2_Indexing_init (__attribute__((unused)) int argc,__attribute_
 {
 }
 
-extern "C" void _M2_Indexing_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Indexing_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index fb22f1b9145531bf5d3491475a4c45437005771e..0057018c97929da4194a21681f463ff0231a673f 100644 (file)
@@ -1156,6 +1156,6 @@ extern "C" void _M2_M2Dependent_init (__attribute__((unused)) int argc,__attribu
   CheckInitialized ();
 }
 
-extern "C" void _M2_M2Dependent_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_M2Dependent_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 7915442b6e1d1649244598bbd04b67a28f542417..387b04764624d6e8cfe4f1ade5ff4c79cc9024cb 100644 (file)
@@ -84,6 +84,6 @@ extern "C" void _M2_M2EXCEPTION_init (__attribute__((unused)) int argc,__attribu
   RTExceptions_SetExceptionBlock (RTExceptions_InitExceptionBlock ());
 }
 
-extern "C" void _M2_M2EXCEPTION_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_M2EXCEPTION_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 1b08741181b271d0d5befe575ec1ac3409c5db78..8a65ae2a116a19a57d6b1d727ffbe1c5c9c6111e 100644 (file)
@@ -188,7 +188,7 @@ extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high,
            to stderr and calls exit (1).
 */
 
-extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description);
+extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
 
 /*
    ExitOnHalt - if HALT is executed then call exit with the exit code, e.
@@ -209,30 +209,30 @@ extern "C" void M2RTS_ErrorMessage (const char *message_, unsigned int _message_
 */
 
 extern "C" unsigned int M2RTS_Length (const char *a_, unsigned int _a_high);
-extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
 
 /*
    ExecuteReverse - execute the procedure associated with procptr
@@ -814,6 +814,6 @@ extern "C" void _M2_M2RTS_init (__attribute__((unused)) int argc,__attribute__((
   CheckInitialized ();
 }
 
-extern "C" void _M2_M2RTS_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_M2RTS_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 5db589e259742c2cdc45167aca9289a73a21b272..8e95e9c79b873b7a764ec47a435761f703a2aa38 100644 (file)
@@ -138,7 +138,7 @@ EXTERN void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsi
            to stderr and calls exit (1).
 */
 
-EXTERN void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description);
+EXTERN void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
 
 /*
    ExitOnHalt - if HALT is executed then call exit with the exit code, e.
@@ -159,30 +159,30 @@ EXTERN void M2RTS_ErrorMessage (const char *message_, unsigned int _message_high
 */
 
 EXTERN unsigned int M2RTS_Length (const char *a_, unsigned int _a_high);
-EXTERN void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-EXTERN void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+EXTERN void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+EXTERN void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
 #   ifdef __cplusplus
 }
 #   endif
index e2af566ee14300b9c691ce1f5ef2cfd8027307e6..a80e00ecec8535f4ec7dacc69045576b3e014a64 100644 (file)
@@ -121,6 +121,6 @@ extern "C" void _M2_MemUtils_init (__attribute__((unused)) int argc,__attribute_
 {
 }
 
-extern "C" void _M2_MemUtils_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_MemUtils_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index be47495cf22a479e0ed5d2cfab0c778355ce5aac..53bac45552c01eb1b16f8e141e9c85e8b0222ca6 100644 (file)
@@ -771,6 +771,6 @@ extern "C" void _M2_NumberIO_init (__attribute__((unused)) int argc,__attribute_
 {
 }
 
-extern "C" void _M2_NumberIO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_NumberIO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 6812343de8c75351af6a7e269b2112752f84e6cb..e15b3eb9007926e9cbf6380eaca84f82445dc86c 100644 (file)
@@ -483,6 +483,6 @@ extern "C" void _M2_PushBackInput_init (__attribute__((unused)) int argc,__attri
   Init ();
 }
 
-extern "C" void _M2_PushBackInput_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_PushBackInput_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index a6aa8069f05d31f71007f733dc3ed8d97d61e18c..23f8fede117bc6ab07278b8922e944adc2adddbc 100644 (file)
@@ -104,7 +104,7 @@ static void * currentSource;
            and message in the EHBlock for later use.
 */
 
-extern "C" void RTExceptions_Raise (unsigned int number, void * file, unsigned int line, unsigned int column, void * function, void * message);
+extern "C" void RTExceptions_Raise (unsigned int number, void * file, unsigned int line, unsigned int column, void * function, void * message) __attribute__ ((noreturn));
 
 /*
    SetExceptionBlock - sets, source, as the active EHB.
@@ -239,7 +239,7 @@ static RTExceptions_Handler findHandler (RTExceptions_EHBlock e, unsigned int nu
                    exception in the active EHB.
 */
 
-static void InvokeHandler (void);
+static void InvokeHandler (void) __attribute__ ((noreturn));
 
 /*
    DoThrow - throw the exception number in the exception block.
@@ -485,6 +485,8 @@ static void InvokeHandler (void)
   else
     {
       (*h->p.proc) ();
+      M2RTS_HALT (-1);
+      __builtin_unreachable ();
     }
 }
 
@@ -719,7 +721,7 @@ static void AddHandler (RTExceptions_EHBlock e, RTExceptions_Handler h)
 
 static void indexf (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 612, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
 }
 
 
@@ -729,7 +731,7 @@ static void indexf (void * a)
 
 static void range (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 624, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
 }
 
 
@@ -739,7 +741,7 @@ static void range (void * a)
 
 static void casef (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 636, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
 }
 
 
@@ -749,7 +751,7 @@ static void casef (void * a)
 
 static void invalidloc (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 648, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
 }
 
 
@@ -759,7 +761,7 @@ static void invalidloc (void * a)
 
 static void function (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 660, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... ")));  /* --fixme-- what has happened ?  */
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... ")));  /* --fixme-- what has happened ?  */
 }
 
 
@@ -769,7 +771,7 @@ static void function (void * a)
 
 static void wholevalue (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 672, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
 }
 
 
@@ -779,7 +781,7 @@ static void wholevalue (void * a)
 
 static void wholediv (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 684, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
 }
 
 
@@ -789,7 +791,7 @@ static void wholediv (void * a)
 
 static void realvalue (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 696, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
 }
 
 
@@ -799,7 +801,7 @@ static void realvalue (void * a)
 
 static void realdiv (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 708, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
 }
 
 
@@ -809,7 +811,7 @@ static void realdiv (void * a)
 
 static void complexvalue (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 720, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
 }
 
 
@@ -819,7 +821,7 @@ static void complexvalue (void * a)
 
 static void complexdiv (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 732, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
 }
 
 
@@ -829,7 +831,7 @@ static void complexdiv (void * a)
 
 static void protection (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 744, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
 }
 
 
@@ -839,7 +841,7 @@ static void protection (void * a)
 
 static void systemf (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 756, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
 }
 
 
@@ -849,7 +851,7 @@ static void systemf (void * a)
 
 static void coroutine (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 768, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
 }
 
 
@@ -859,7 +861,7 @@ static void coroutine (void * a)
 
 static void exception (void * a)
 {
-  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 780, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
+  RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
 }
 
 
@@ -1178,7 +1180,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_GetBaseExceptionBlock (void)
 {
   if (currentEHB == NULL)
     {
-      M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 598, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
+      M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
     }
   else
     {
@@ -1215,7 +1217,7 @@ extern "C" void _M2_RTExceptions_init (__attribute__((unused)) int argc,__attrib
   Init ();
 }
 
-extern "C" void _M2_RTExceptions_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_RTExceptions_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
   TidyUp ();
 }
index 9f36bdd9eeadd7cc541bf7000e032a1440792db7..3f8e64dc7f30828f20ed7206e1d46bfb3b9c1214 100644 (file)
@@ -65,7 +65,7 @@ struct RTExceptions_ProcedureHandler_p { RTExceptions_ProcedureHandler_t proc; }
            and message in the EHBlock for later use.
 */
 
-EXTERN void RTExceptions_Raise (unsigned int number, void * file, unsigned int line, unsigned int column, void * function, void * message);
+EXTERN void RTExceptions_Raise (unsigned int number, void * file, unsigned int line, unsigned int column, void * function, void * message) __attribute__ ((noreturn));
 
 /*
    SetExceptionBlock - sets, source, as the active EHB.
index c80395b8ffc2240a01f09b74847d7ba01316fcc7..180c495a9a2caf9d1d9b669371108c0a013f48c4 100644 (file)
@@ -41,6 +41,7 @@ extern "C" {
 #   endif
 
 #   include "GSYSTEM.h"
+#   include "GRTentity.h"
 
 #   if defined (_RTco_C)
 #      define EXTERN
diff --git a/gcc/m2/mc-boot/GRTentity.h b/gcc/m2/mc-boot/GRTentity.h
new file mode 100644 (file)
index 0000000..9fc2492
--- /dev/null
@@ -0,0 +1,67 @@
+/* do not edit automatically generated by mc from RTentity.  */
+/* RTentity.def maintains a grouping of different opaque types.
+
+Copyright (C) 2008-2023 Free Software Foundation, Inc.
+Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
+
+This file is part of GNU Modula-2.
+
+GNU Modula-2 is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GNU Modula-2 is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+
+#if !defined (_RTentity_H)
+#   define _RTentity_H
+
+#include "config.h"
+#include "system.h"
+#   ifdef __cplusplus
+extern "C" {
+#   endif
+#   if !defined (PROC_D)
+#      define PROC_D
+       typedef void (*PROC_t) (void);
+       typedef struct { PROC_t proc; } PROC;
+#   endif
+
+#   include "GSYSTEM.h"
+
+#   if defined (_RTentity_C)
+#      define EXTERN
+#   else
+#      define EXTERN extern
+#   endif
+
+#if !defined (RTentity_Group_D)
+#  define RTentity_Group_D
+   typedef void *RTentity_Group;
+#endif
+
+EXTERN RTentity_Group RTentity_InitGroup (void);
+EXTERN RTentity_Group RTentity_KillGroup (RTentity_Group g);
+EXTERN unsigned int RTentity_GetKey (RTentity_Group g, void * a);
+EXTERN void RTentity_PutKey (RTentity_Group g, void * a, unsigned int key);
+EXTERN void RTentity_DelKey (RTentity_Group g, void * a);
+EXTERN unsigned int RTentity_IsIn (RTentity_Group g, void * a);
+#   ifdef __cplusplus
+}
+#   endif
+
+#   undef EXTERN
+#endif
index d8cac277252bafe1dbb05a144fc83508137a2e82..bc83e46c27998932654108b1e1f0bb0aae508b25 100644 (file)
@@ -1117,6 +1117,6 @@ extern "C" void _M2_RTint_init (__attribute__((unused)) int argc,__attribute__((
   RTint_Init ();
 }
 
-extern "C" void _M2_RTint_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_RTint_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index fb6b95344257d869b920bb645542fa5eff5351b9..143d2783c16e18091b22a37e39580cbfe23360e4 100644 (file)
@@ -120,6 +120,6 @@ extern "C" void _M2_SArgs_init (__attribute__((unused)) int argc,__attribute__((
 {
 }
 
-extern "C" void _M2_SArgs_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_SArgs_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 23c9a378fb6745c6aeb65dd4aa6d6588b2efba47..1a800138812c9895dee4a0d5a5d7a1072da13d81 100644 (file)
@@ -211,6 +211,6 @@ extern "C" void _M2_SFIO_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_SFIO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_SFIO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 8bb03af9e3e6146ac1b06596d3b3f2422d4d05a5..41affe2a054d55d0590c1ce55cabb91f57be6fa4 100644 (file)
@@ -264,6 +264,6 @@ extern "C" void _M2_StdIO_init (__attribute__((unused)) int argc,__attribute__((
   StdIO_PushInput ((StdIO_ProcRead) {(StdIO_ProcRead_t) IO_Read});
 }
 
-extern "C" void _M2_StdIO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_StdIO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index e0560890035443487a1b7124f1f4c2b9265ce742..5dac021d8665af0cd09e4787e70e75d776ae2202 100644 (file)
@@ -69,6 +69,6 @@ extern "C" void _M2_Storage_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_Storage_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_Storage_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index bf0986c5e8bea6641c9a61cc4133c46cd9f2b02c..e3491b6d75b1656f269a4fb663d1ab65f46b63ea 100644 (file)
@@ -170,6 +170,6 @@ extern "C" void _M2_StrCase_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_StrCase_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_StrCase_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 8d3b106f79deb5811af6cb3b9c35cbef9dec6196..1e091bce54564e3ccf80b3e03ecbbefe3f94b394 100644 (file)
@@ -272,6 +272,6 @@ extern "C" void _M2_StrIO_init (__attribute__((unused)) int argc,__attribute__((
   IsATTY = FALSE;
 }
 
-extern "C" void _M2_StrIO_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_StrIO_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index e212c301d2dd11bb57b6d57a5901bb55ae008240..537eeb963567733a0769ed237dfe1656112d6870 100644 (file)
@@ -341,6 +341,6 @@ extern "C" void _M2_StrLib_init (__attribute__((unused)) int argc,__attribute__(
 {
 }
 
-extern "C" void _M2_StrLib_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_StrLib_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 8b87e0bda25231059448e93c1c267d231c868aae..faa5e34459ecbe654fa9defc9b898357cf2bb021 100644 (file)
@@ -2000,6 +2000,6 @@ extern "C" void _M2_StringConvert_init (__attribute__((unused)) int argc,__attri
 {
 }
 
-extern "C" void _M2_StringConvert_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_StringConvert_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index d5218fb4b428c21f1f011d730f886c5567df6b51..98c03f66c358a38149f154fab251348c49339263 100644 (file)
@@ -244,6 +244,6 @@ extern "C" void _M2_SysStorage_init (__attribute__((unused)) int argc,__attribut
     }
 }
 
-extern "C" void _M2_SysStorage_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_SysStorage_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 1af8024c67faffcd97b361a2de6f8547b9f5b1ad..7e50f4b755187c290795d1b2c8dcd0417ddde218 100644 (file)
@@ -86,6 +86,6 @@ extern "C" void _M2_TimeString_init (__attribute__((unused)) int argc,__attribut
 {
 }
 
-extern "C" void _M2_TimeString_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_TimeString_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 3800f450802f18a181bac5a7c38a738cdc48cf87..3e84a5003377fe995f41aa7da808e111a6c2e739 100644 (file)
@@ -435,6 +435,6 @@ extern "C" void _M2_alists_init (__attribute__((unused)) int argc,__attribute__(
 {
 }
 
-extern "C" void _M2_alists_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_alists_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 6511cbb28e300406d10ad6a1709ac2f0bef77052..ff8298c73cc2457d319e9f4de804883e47c86203 100644 (file)
@@ -1038,34 +1038,34 @@ extern "C" void M2RTS_ExecuteTerminationProcedures (void);
 extern "C" void M2RTS_Terminate (void) __attribute__ ((noreturn));
 extern "C" void M2RTS_HALT (int exitcode) __attribute__ ((noreturn));
 extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high) __attribute__ ((noreturn));
-extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description);
+extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
 extern "C" void M2RTS_ExitOnHalt (int e);
 extern "C" void M2RTS_ErrorMessage (const char *message_, unsigned int _message_high, const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high) __attribute__ ((noreturn));
 extern "C" unsigned int M2RTS_Length (const char *a_, unsigned int _a_high);
-extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
-extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
 
 /*
    getDeclaredMod - returns the token number associated with the nodes declaration
@@ -20138,7 +20138,7 @@ static void scaffoldStatic (mcPretty_pretty p, decl_node n)
   mcPretty_setNeedSpace (p);
   outText (p, (const char *) "_M2_", 4);
   doFQNameC (p, n);
-  outText (p, (const char *) "_finish", 7);
+  outText (p, (const char *) "_fini", 5);
   mcPretty_setNeedSpace (p);
   outText (p, (const char *) "(__attribute__((unused)) int argc", 33);
   outText (p, (const char *) ",__attribute__((unused)) char *argv[]", 37);
@@ -20491,7 +20491,7 @@ static void outModuleInitC (mcPretty_pretty p, decl_node n)
   mcPretty_setNeedSpace (p);
   outText (p, (const char *) "_M2_", 4);
   doFQNameC (p, n);
-  outText (p, (const char *) "_finish", 7);
+  outText (p, (const char *) "_fini", 5);
   mcPretty_setNeedSpace (p);
   outText (p, (const char *) "(__attribute__((unused)) int argc", 33);
   outText (p, (const char *) ",__attribute__((unused)) char *argv[]", 37);
@@ -26918,6 +26918,6 @@ extern "C" void _M2_decl_init (__attribute__((unused)) int argc,__attribute__((u
   init ();
 }
 
-extern "C" void _M2_decl_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_decl_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index e000bfe60f01b85d1b2e3410bcdb249e9773fc59..e089ac9525017d6710bbe6cdd0507866f4ac6d21 100644 (file)
@@ -1614,6 +1614,6 @@ extern "C" void _M2_keyc_init (__attribute__((unused)) int argc,__attribute__((u
   init ();
 }
 
-extern "C" void _M2_keyc_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_keyc_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 5bfc035514d6b1ac0757338bc82f00d6d7119b5d..63bced70ffdafd1d96eb8b9b9df24561aef562be 100644 (file)
@@ -434,6 +434,6 @@ extern "C" void _M2_lists_init (__attribute__((unused)) int argc,__attribute__((
 {
 }
 
-extern "C" void _M2_lists_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_lists_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 4dfad51f4a8fe7da67975450b8e12896709b0177..2e60c7aa567bc7ad5db88c0f1028a4c7b0b355c2 100644 (file)
@@ -463,6 +463,6 @@ extern "C" void _M2_mcComment_init (__attribute__((unused)) int argc,__attribute
 {
 }
 
-extern "C" void _M2_mcComment_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcComment_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index e6b4e35bffe89f5b1c47040ab35acc90a858d1d8..8a79413add4e28754c279738d96c74ca151e55f7 100644 (file)
@@ -655,6 +655,6 @@ extern "C" void _M2_mcComp_init (__attribute__((unused)) int argc,__attribute__(
   init ();
 }
 
-extern "C" void _M2_mcComp_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcComp_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 8cac40ea03351ec091f5dfa6af82bf985448b405..db45ae8ac87c55214cbc74b2c287097b9dc6ddf9 100644 (file)
@@ -81,6 +81,6 @@ extern "C" void _M2_mcDebug_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_mcDebug_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcDebug_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 647adfd3a09dc5b52b581ca162488ac6e627b676..cf96ceb79bda0ca6dfc8aef4ea999daf2f55caba 100644 (file)
@@ -1192,6 +1192,6 @@ extern "C" void _M2_mcError_init (__attribute__((unused)) int argc,__attribute__
   init ();
 }
 
-extern "C" void _M2_mcError_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcError_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index b41bcf6debef290c3157d78ae879da326756e6ad..3413d8949d37dd174d46d7fc458cb6e42e33ae9c 100644 (file)
@@ -147,6 +147,6 @@ extern "C" void _M2_mcFileName_init (__attribute__((unused)) int argc,__attribut
 {
 }
 
-extern "C" void _M2_mcFileName_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcFileName_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 5697885a83c7cbea0b4a7824bc02b54a827f8137..d310e87929df51df2226937e024e6ec82fe86e4a 100644 (file)
@@ -1844,6 +1844,6 @@ extern "C" void _M2_mcLexBuf_init (__attribute__((unused)) int argc,__attribute_
   init ();
 }
 
-extern "C" void _M2_mcLexBuf_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcLexBuf_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 3073e62139a8d3d1dfb1d926ab2fa03a05d4488e..4d406851d0bead784029297713bf2acea949f220 100644 (file)
@@ -1875,6 +1875,6 @@ extern "C" void _M2_mcMetaError_init (__attribute__((unused)) int argc,__attribu
 {
 }
 
-extern "C" void _M2_mcMetaError_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcMetaError_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 77801c04f053f80560b0d925524d4b8fc591fdd3..40f4154518dab7ba471363650753a0186a02318a 100644 (file)
@@ -1075,6 +1075,6 @@ extern "C" void _M2_mcOptions_init (__attribute__((unused)) int argc,__attribute
   projectContents = DynamicStrings_InitString ((const char *) "GNU Modula-2", 12);
 }
 
-extern "C" void _M2_mcOptions_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcOptions_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index df335c08e204d0d7441f7d9a4a4c60e785337530..91a50939d800f08c7a6e43cd6029f739630847f9 100644 (file)
@@ -176,6 +176,6 @@ extern "C" void _M2_mcPreprocess_init (__attribute__((unused)) int argc,__attrib
     }
 }
 
-extern "C" void _M2_mcPreprocess_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcPreprocess_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 674db9443a58661fbc5b95a9e206234c23b0b4ea..1184514fd252c7c7eeb62675e6a26e739c6fd312 100644 (file)
@@ -463,6 +463,6 @@ extern "C" void _M2_mcPretty_init (__attribute__((unused)) int argc,__attribute_
 {
 }
 
-extern "C" void _M2_mcPretty_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcPretty_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 0bfe898e155d0e21fe1b0abcfd260ad0bfe96e2c..a8660a50f4c89856f6969de5fdf004adfad098ed 100644 (file)
@@ -650,6 +650,6 @@ extern "C" void _M2_mcPrintf_init (__attribute__((unused)) int argc,__attribute_
 {
 }
 
-extern "C" void _M2_mcPrintf_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcPrintf_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 88115761c8b4db59dfb89e0772fda0c8f26d4005..bcf1026001a559ace1e94da671847ee4e0d0581f 100644 (file)
@@ -124,6 +124,6 @@ extern "C" void _M2_mcQuiet_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_mcQuiet_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcQuiet_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index a1221f9d85e4b06a64c214f15260eb082324f13f..60b879630bbce97ffb38f9a1e2118045f8fd98f8 100644 (file)
@@ -35,6 +35,6 @@ extern "C" void _M2_mcReserved_init (__attribute__((unused)) int argc,__attribut
 {
 }
 
-extern "C" void _M2_mcReserved_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcReserved_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 08b9312c22fb105bec43aa9bfbe12c53217a61ca..a4541fa0d370e335e65b3b471d8b7785561c2514 100644 (file)
@@ -403,6 +403,6 @@ extern "C" void _M2_mcSearch_init (__attribute__((unused)) int argc,__attribute_
   Init ();
 }
 
-extern "C" void _M2_mcSearch_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcSearch_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index a1f13d8f19ce08fab709bc10b2b0c49f1e2df9ce..95d31a5037b1ece6f8aac6078952df478a95729b 100644 (file)
@@ -223,6 +223,6 @@ extern "C" void _M2_mcStack_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_mcStack_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcStack_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 43cf461af3b987f09a902e81c6671c847a9e430c..e4ce0528cf5cdc7bb4cd21a2d7557db985b074ca 100644 (file)
@@ -261,6 +261,6 @@ extern "C" void _M2_mcStream_init (__attribute__((unused)) int argc,__attribute_
   frag = Indexing_InitIndex (1);
 }
 
-extern "C" void _M2_mcStream_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcStream_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 6c9c84962c44713ad12d78ae0d128e93c49f0a16..97bedb257140c10ed6a779c77f0c2a9c2291d6d0 100644 (file)
@@ -7260,6 +7260,6 @@ extern "C" void _M2_mcp1_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_mcp1_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcp1_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index f336ac23a451e3f848fcf4b5b22ae617154aa16c..85fd19326df4c9f794de072de2688d2816466543 100644 (file)
@@ -7632,6 +7632,6 @@ extern "C" void _M2_mcp2_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_mcp2_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcp2_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 03a361a6dfd05f3ad9b5d5f3e5f0e65dfdf37667..4ff8d80307ab65ee29b07ffe7ac03ff5ede2e946 100644 (file)
@@ -7849,6 +7849,6 @@ extern "C" void _M2_mcp3_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_mcp3_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcp3_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 50e4ddb89bda19a48f5007d1e683ba26153fd7e4..5eab5ae58edfb4648f9880fcd95d81ea7c169426 100644 (file)
@@ -7712,6 +7712,6 @@ extern "C" void _M2_mcp4_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_mcp4_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcp4_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 1806d156e54aa6948f20cbe570ffc0094a4ce643..9af8aac9dd511a95cc3d9004eeef1a7670aae1ab 100644 (file)
@@ -8571,6 +8571,6 @@ extern "C" void _M2_mcp5_init (__attribute__((unused)) int argc,__attribute__((u
 {
 }
 
-extern "C" void _M2_mcp5_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_mcp5_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 11cb6fa92e48efce3de4c0966a1becf4083056f5..b00a59868e4cc4e9a56c62bcb9c63fb1781a059b 100644 (file)
@@ -579,6 +579,6 @@ extern "C" void _M2_nameKey_init (__attribute__((unused)) int argc,__attribute__
   binaryTree->left = NULL;
 }
 
-extern "C" void _M2_nameKey_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_nameKey_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index e72133ea3fda22565b732a0b3bb92f34c30ceb6f..8c16a63474e5ad5e2fc591a395b50ddc4e749a42 100644 (file)
@@ -401,6 +401,6 @@ extern "C" void _M2_symbolKey_init (__attribute__((unused)) int argc,__attribute
 {
 }
 
-extern "C" void _M2_symbolKey_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_symbolKey_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index f00e1be196b30c29a070561c897b1c19421bb495..20c96133c20c12525f30c0041f77e1d1f1d5a064 100644 (file)
@@ -95,6 +95,6 @@ extern "C" void _M2_top_init (__attribute__((unused)) int argc,__attribute__((un
   init ();
 }
 
-extern "C" void _M2_top_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_top_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index 30f76e2036255b8c8f84a474769313521ffd6ea9..faf7f7703d87a0a755ff116fa1c5270455856bb8 100644 (file)
@@ -426,6 +426,6 @@ extern "C" void _M2_varargs_init (__attribute__((unused)) int argc,__attribute__
 {
 }
 
-extern "C" void _M2_varargs_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_varargs_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index aa490ef3b86ec42a51fda8634f0981ac72253c9d..c8daafd4ff8f55cd24b0257063a0b1f7cfcce9e8 100644 (file)
@@ -466,6 +466,6 @@ extern "C" void _M2_wlists_init (__attribute__((unused)) int argc,__attribute__(
 {
 }
 
-extern "C" void _M2_wlists_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
+extern "C" void _M2_wlists_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
 {
 }
index f6afd666eb6d23b37a628a00e5f2076f3619fc82..3550fd606a5ee4cbff7b9686a00d2946b6aa1e03 100644 (file)
@@ -14129,7 +14129,7 @@ BEGIN
    setNeedSpace (p) ;
    outText (p, "_M2_") ;
    doFQNameC (p, n) ;
-   outText (p, "_finish") ;
+   outText (p, "_fini") ;
    setNeedSpace (p) ;
    outText (p, "(__attribute__((unused)) int argc") ;
    outText (p, ",__attribute__((unused)) char *argv[]") ;
@@ -14487,7 +14487,7 @@ BEGIN
    setNeedSpace (p) ;
    outText (p, "_M2_") ;
    doFQNameC (p, n) ;
-   outText (p, "_finish") ;
+   outText (p, "_fini") ;
    setNeedSpace (p) ;
    outText (p, "(__attribute__((unused)) int argc") ;
    outText (p, ",__attribute__((unused)) char *argv[]") ;
index 0ce9ba5453c192e0d57b67c225e5ad00bcee1d52..4b37755bbc29ce339fbddb7a37e693072b60e332 100644 (file)
@@ -732,6 +732,11 @@ _M2_mcflex_init (void)
 {
 }
 
+void
+_M2_mcflex_fini (void)
+{
+}
+
 void
 _M2_mcflex_finish (void)
 {
index a460c249e183d4ac52c1c860c4783d059354272b..2027f75c7333b9f4b0854c07c92442d60fe0fe03 100644 (file)
@@ -361,7 +361,7 @@ GenerateFinishCalls (functList *p)
 {
   if (p->next != NULL)
     GenerateFinishCalls (p->next);
-  printf ("   _M2_%s_finish (argc, argv, envp);\n", p->functname);
+  printf ("   _M2_%s_fini (argc, argv, envp);\n", p->functname);
 }
 
 static void
@@ -373,14 +373,14 @@ GeneratePrototypes (functList *p)
         {
           printf ("extern void _M2_%s_init (int argc, char *argv[], char *envp[]);\n",
                   p->functname);
-          printf ("extern void _M2_%s_finish (int argc, char *argv[], char *envp[]);\n",
+          printf ("extern void _M2_%s_fini (int argc, char *argv[], char *envp[]);\n",
                   p->functname);
         }
       else
         {
           printf ("extern \"C\" void _M2_%s_init (int argc, char *argv[], char *envp[]);\n",
                   p->functname);
-          printf ("extern \"C\" void _M2_%s_finish (int argc, char *argv[], char *envp[]);\n",
+          printf ("extern \"C\" void _M2_%s_fini (int argc, char *argv[], char *envp[]);\n",
                   p->functname);
         }
       p = p->next;
index a03af21a8a7380305dae7a48cb4c20cde30a282c..662a440f40c009f14173f690a19a0607bfe331de 100644 (file)
@@ -113,7 +113,7 @@ nodist_EXTRA_libm2cor_la_SOURCES = dummy.c  ## forces automake to generate the L
 libm2cordir = libm2cor
 libm2cor_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2cor_la_SOURCES)))
 libm2cor_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../  -I@srcdir@/../libm2iso
-libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g
+libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase
 if TARGET_DARWIN
 libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup
 else
index 176ca55d15c6d7654587e26b80cd1a93e0c41c34..ca3ddd08e1b4ccc346e4f4d2ce0a9e1f4c531105 100644 (file)
@@ -463,7 +463,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 @BUILD_CORLIB_TRUE@libm2cordir = libm2cor
 @BUILD_CORLIB_TRUE@libm2cor_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2cor_la_SOURCES)))
 @BUILD_CORLIB_TRUE@libm2cor_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../  -I@srcdir@/../libm2iso
-@BUILD_CORLIB_TRUE@libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g
+@BUILD_CORLIB_TRUE@libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase
 @BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@libm2cor_la_link_flags = 
 @BUILD_CORLIB_TRUE@@TARGET_DARWIN_TRUE@libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup
 @BUILD_CORLIB_TRUE@libm2cor_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2cor_la_link_flags)
index 843b595b39e0a097598212649a58c7b2cd68bc90..cc9a4773c1d90a8f08ca7cd9b4e80d419df8bb3d 100644 (file)
@@ -186,7 +186,7 @@ C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
 libm2isodir = libm2iso
 libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES)))
 libm2iso_la_CFLAGS = $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include
-libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g
+libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g -Wreturn-type -fcase
 if TARGET_DARWIN
 libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup
 else
index 55cafa233b32a8bbdd59fe9186d564aeda62cf64..b96136ad1adeb94554a1fe3d2a6bd699fa94146d 100644 (file)
@@ -563,7 +563,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 @BUILD_ISOLIB_TRUE@libm2isodir = libm2iso
 @BUILD_ISOLIB_TRUE@libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES)))
 @BUILD_ISOLIB_TRUE@libm2iso_la_CFLAGS = $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include
-@BUILD_ISOLIB_TRUE@libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g
+@BUILD_ISOLIB_TRUE@libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g -Wreturn-type -fcase
 @BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@libm2iso_la_link_flags = 
 @BUILD_ISOLIB_TRUE@@TARGET_DARWIN_TRUE@libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup
 @BUILD_ISOLIB_TRUE@libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags)
index e8e4581adafd74da3cc7e97fc18f931116c8ae00..450673f9d3daec3f1e54b2cae0f5be8d1983fe8a 100644 (file)
@@ -131,7 +131,7 @@ libm2log_la_SOURCES = $(M2MODS) Break.c
 
 libm2log_la_DEPENDENCIES = ../libm2pim/SYSTEM.def $(addsuffix .lo, $(basename $(libm2log_la_SOURCES)))
 libm2log_la_CFLAGS = -I. -DBUILD_GM2_LIBS -I@srcdir@/../
-libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso
+libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -Wreturn-type -fcase
 if TARGET_DARWIN
 libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup
 else
index 11e25cab741473133f1f3216c7b955651d75256c..c8d36a3e766810f2af02dfa221215f2f02da8f96 100644 (file)
@@ -471,7 +471,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 @BUILD_LOGLIB_TRUE@libm2log_la_SOURCES = $(M2MODS) Break.c
 @BUILD_LOGLIB_TRUE@libm2log_la_DEPENDENCIES = ../libm2pim/SYSTEM.def $(addsuffix .lo, $(basename $(libm2log_la_SOURCES)))
 @BUILD_LOGLIB_TRUE@libm2log_la_CFLAGS = -I. -DBUILD_GM2_LIBS -I@srcdir@/../
-@BUILD_LOGLIB_TRUE@libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso
+@BUILD_LOGLIB_TRUE@libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -Wreturn-type -fcase
 @BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@libm2log_la_link_flags = 
 @BUILD_LOGLIB_TRUE@@TARGET_DARWIN_TRUE@libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup
 @BUILD_LOGLIB_TRUE@libm2log_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2log_la_link_flags)
index aa4c4c89bfcda2d4e3c0f4823a3d974f1361ab5f..7bb08c0712c0934f042b4404e8cd8ae5e2c1b8d4 100644 (file)
@@ -166,7 +166,7 @@ libm2pim_la_SOURCES = $(M2MODS) \
 libm2pimdir = libm2pim
 libm2pim_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2pim_la_SOURCES)))
 libm2pim_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../  -I@srcdir@/../libm2iso
-libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g
+libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase
 if TARGET_DARWIN
 libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup
 else
index 7d81a7a86fc937f07ffbaeec7d1ad7725faa5c08..7a59893553c9ed5f215bc72130bfd84269a4f082 100644 (file)
@@ -534,7 +534,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 @BUILD_PIMLIB_TRUE@libm2pimdir = libm2pim
 @BUILD_PIMLIB_TRUE@libm2pim_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2pim_la_SOURCES)))
 @BUILD_PIMLIB_TRUE@libm2pim_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../  -I@srcdir@/../libm2iso
-@BUILD_PIMLIB_TRUE@libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g
+@BUILD_PIMLIB_TRUE@libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase
 @BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@libm2pim_la_link_flags = 
 @BUILD_PIMLIB_TRUE@@TARGET_DARWIN_TRUE@libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup
 @BUILD_PIMLIB_TRUE@libm2pim_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2pim_la_link_flags)