aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/m2/Make-lang.in6
-rw-r--r--gcc/m2/Make-maintainer.in112
-rw-r--r--gcc/m2/gm2-compiler/M2ALU.mod4
-rw-r--r--gcc/m2/gm2-compiler/M2Base.mod11
-rw-r--r--gcc/m2/gm2-compiler/M2GCCDeclare.mod6
-rw-r--r--gcc/m2/gm2-compiler/M2GenGCC.mod8
-rw-r--r--gcc/m2/gm2-compiler/M2Quads.mod10
-rw-r--r--gcc/m2/gm2-compiler/M2System.mod2
-rw-r--r--gcc/m2/gm2-gcc/m2except.cc6
-rw-r--r--gcc/m2/gm2-libs-coroutines/Debug.def2
-rw-r--r--gcc/m2/gm2-libs-coroutines/SYSTEM.def2
-rw-r--r--gcc/m2/gm2-libs-iso/ClientSocket.mod9
-rw-r--r--gcc/m2/gm2-libs-iso/EXCEPTIONS.def3
-rw-r--r--gcc/m2/gm2-libs-iso/IOLink.def4
-rw-r--r--gcc/m2/gm2-libs-iso/M2RTS.def57
-rw-r--r--gcc/m2/gm2-libs-iso/SYSTEM.def2
-rw-r--r--gcc/m2/gm2-libs-iso/TermFile.mod16
-rw-r--r--gcc/m2/gm2-libs-min/M2RTS.def2
-rw-r--r--gcc/m2/gm2-libs/FIO.mod13
-rw-r--r--gcc/m2/gm2-libs/M2RTS.def50
-rw-r--r--gcc/m2/gm2-libs/RTExceptions.def2
-rw-r--r--gcc/m2/gm2-libs/RTExceptions.mod15
-rw-r--r--gcc/m2/gm2-libs/SYSTEM.def2
-rw-r--r--gcc/m2/m2.flex2
-rw-r--r--gcc/m2/mc-boot-ch/GBuiltins.c2
-rw-r--r--gcc/m2/mc-boot-ch/GRTco.c2
-rw-r--r--gcc/m2/mc-boot-ch/GSYSTEM.c2
-rw-r--r--gcc/m2/mc-boot-ch/GSelective.c2
-rw-r--r--gcc/m2/mc-boot-ch/GSysExceptions.c4
-rw-r--r--gcc/m2/mc-boot-ch/GUnixArgs.cc4
-rw-r--r--gcc/m2/mc-boot-ch/Gdtoa.c2
-rw-r--r--gcc/m2/mc-boot-ch/Gerrno.c2
-rw-r--r--gcc/m2/mc-boot-ch/Gldtoa.c2
-rw-r--r--gcc/m2/mc-boot-ch/Gtermios.cc4
-rw-r--r--gcc/m2/mc-boot-ch/Gwrapc.c4
-rw-r--r--gcc/m2/mc-boot/GASCII.c2
-rw-r--r--gcc/m2/mc-boot/GArgs.c2
-rw-r--r--gcc/m2/mc-boot/GAssertion.c2
-rw-r--r--gcc/m2/mc-boot/GBreak.c2
-rw-r--r--gcc/m2/mc-boot/GCmdArgs.c2
-rw-r--r--gcc/m2/mc-boot/GDebug.c2
-rw-r--r--gcc/m2/mc-boot/GDynamicStrings.c2
-rw-r--r--gcc/m2/mc-boot/GEnvironment.c2
-rw-r--r--gcc/m2/mc-boot/GFIO.c2
-rw-r--r--gcc/m2/mc-boot/GFormatStrings.c2
-rw-r--r--gcc/m2/mc-boot/GFpuIO.c2
-rw-r--r--gcc/m2/mc-boot/GIO.c2
-rw-r--r--gcc/m2/mc-boot/GIndexing.c2
-rw-r--r--gcc/m2/mc-boot/GM2Dependent.c2
-rw-r--r--gcc/m2/mc-boot/GM2EXCEPTION.c2
-rw-r--r--gcc/m2/mc-boot/GM2RTS.c52
-rw-r--r--gcc/m2/mc-boot/GM2RTS.h50
-rw-r--r--gcc/m2/mc-boot/GMemUtils.c2
-rw-r--r--gcc/m2/mc-boot/GNumberIO.c2
-rw-r--r--gcc/m2/mc-boot/GPushBackInput.c2
-rw-r--r--gcc/m2/mc-boot/GRTExceptions.c40
-rw-r--r--gcc/m2/mc-boot/GRTExceptions.h2
-rw-r--r--gcc/m2/mc-boot/GRTco.h1
-rw-r--r--gcc/m2/mc-boot/GRTentity.h67
-rw-r--r--gcc/m2/mc-boot/GRTint.c2
-rw-r--r--gcc/m2/mc-boot/GSArgs.c2
-rw-r--r--gcc/m2/mc-boot/GSFIO.c2
-rw-r--r--gcc/m2/mc-boot/GStdIO.c2
-rw-r--r--gcc/m2/mc-boot/GStorage.c2
-rw-r--r--gcc/m2/mc-boot/GStrCase.c2
-rw-r--r--gcc/m2/mc-boot/GStrIO.c2
-rw-r--r--gcc/m2/mc-boot/GStrLib.c2
-rw-r--r--gcc/m2/mc-boot/GStringConvert.c2
-rw-r--r--gcc/m2/mc-boot/GSysStorage.c2
-rw-r--r--gcc/m2/mc-boot/GTimeString.c2
-rw-r--r--gcc/m2/mc-boot/Galists.c2
-rw-r--r--gcc/m2/mc-boot/Gdecl.c56
-rw-r--r--gcc/m2/mc-boot/Gkeyc.c2
-rw-r--r--gcc/m2/mc-boot/Glists.c2
-rw-r--r--gcc/m2/mc-boot/GmcComment.c2
-rw-r--r--gcc/m2/mc-boot/GmcComp.c2
-rw-r--r--gcc/m2/mc-boot/GmcDebug.c2
-rw-r--r--gcc/m2/mc-boot/GmcError.c2
-rw-r--r--gcc/m2/mc-boot/GmcFileName.c2
-rw-r--r--gcc/m2/mc-boot/GmcLexBuf.c2
-rw-r--r--gcc/m2/mc-boot/GmcMetaError.c2
-rw-r--r--gcc/m2/mc-boot/GmcOptions.c2
-rw-r--r--gcc/m2/mc-boot/GmcPreprocess.c2
-rw-r--r--gcc/m2/mc-boot/GmcPretty.c2
-rw-r--r--gcc/m2/mc-boot/GmcPrintf.c2
-rw-r--r--gcc/m2/mc-boot/GmcQuiet.c2
-rw-r--r--gcc/m2/mc-boot/GmcReserved.c2
-rw-r--r--gcc/m2/mc-boot/GmcSearch.c2
-rw-r--r--gcc/m2/mc-boot/GmcStack.c2
-rw-r--r--gcc/m2/mc-boot/GmcStream.c2
-rw-r--r--gcc/m2/mc-boot/Gmcp1.c2
-rw-r--r--gcc/m2/mc-boot/Gmcp2.c2
-rw-r--r--gcc/m2/mc-boot/Gmcp3.c2
-rw-r--r--gcc/m2/mc-boot/Gmcp4.c2
-rw-r--r--gcc/m2/mc-boot/Gmcp5.c2
-rw-r--r--gcc/m2/mc-boot/GnameKey.c2
-rw-r--r--gcc/m2/mc-boot/GsymbolKey.c2
-rw-r--r--gcc/m2/mc-boot/Gtop.c2
-rw-r--r--gcc/m2/mc-boot/Gvarargs.c2
-rw-r--r--gcc/m2/mc-boot/Gwlists.c2
-rw-r--r--gcc/m2/mc/decl.mod4
-rw-r--r--gcc/m2/mc/mc.flex5
-rw-r--r--gcc/m2/tools-src/mklink.c6
103 files changed, 445 insertions, 330 deletions
diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index 03677d9..47a5b2f 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -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 \
diff --git a/gcc/m2/Make-maintainer.in b/gcc/m2/Make-maintainer.in
index fdb0758..d2339b3 100644
--- a/gcc/m2/Make-maintainer.in
+++ b/gcc/m2/Make-maintainer.in
@@ -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]" ; \
diff --git a/gcc/m2/gm2-compiler/M2ALU.mod b/gcc/m2/gm2-compiler/M2ALU.mod
index 678f310..9739c76 100644
--- a/gcc/m2/gm2-compiler/M2ALU.mod
+++ b/gcc/m2/gm2-compiler/M2ALU.mod
@@ -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 ;
diff --git a/gcc/m2/gm2-compiler/M2Base.mod b/gcc/m2/gm2-compiler/M2Base.mod
index 3436d17..cc3aa4c 100644
--- a/gcc/m2/gm2-compiler/M2Base.mod
+++ b/gcc/m2/gm2-compiler/M2Base.mod
@@ -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 ;
diff --git a/gcc/m2/gm2-compiler/M2GCCDeclare.mod b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
index 445c039..ef1859f 100644
--- a/gcc/m2/gm2-compiler/M2GCCDeclare.mod
+++ b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
@@ -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
diff --git a/gcc/m2/gm2-compiler/M2GenGCC.mod b/gcc/m2/gm2-compiler/M2GenGCC.mod
index f32f7ee..caca8a3 100644
--- a/gcc/m2/gm2-compiler/M2GenGCC.mod
+++ b/gcc/m2/gm2-compiler/M2GenGCC.mod
@@ -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
diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index 3b6ed45..17062b9 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -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. *)
diff --git a/gcc/m2/gm2-compiler/M2System.mod b/gcc/m2/gm2-compiler/M2System.mod
index 8242584..4908578 100644
--- a/gcc/m2/gm2-compiler/M2System.mod
+++ b/gcc/m2/gm2-compiler/M2System.mod
@@ -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()) ;
diff --git a/gcc/m2/gm2-gcc/m2except.cc b/gcc/m2/gm2-gcc/m2except.cc
index ab7df80..b3cd651 100644
--- a/gcc/m2/gm2-gcc/m2except.cc
+++ b/gcc/m2/gm2-gcc/m2except.cc
@@ -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);
diff --git a/gcc/m2/gm2-libs-coroutines/Debug.def b/gcc/m2/gm2-libs-coroutines/Debug.def
index 58edecf..a4f5b68 100644
--- a/gcc/m2/gm2-libs-coroutines/Debug.def
+++ b/gcc/m2/gm2-libs-coroutines/Debug.def
@@ -51,7 +51,7 @@ TYPE
PROCEDURE Halt (File : ARRAY OF CHAR;
LineNo : CARDINAL;
Function,
- Message : ARRAY OF CHAR) ;
+ Message : ARRAY OF CHAR) <* noreturn *> ;
(*
diff --git a/gcc/m2/gm2-libs-coroutines/SYSTEM.def b/gcc/m2/gm2-libs-coroutines/SYSTEM.def
index 3b48434..5a66d20 100644
--- a/gcc/m2/gm2-libs-coroutines/SYSTEM.def
+++ b/gcc/m2/gm2-libs-coroutines/SYSTEM.def
@@ -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
diff --git a/gcc/m2/gm2-libs-iso/ClientSocket.mod b/gcc/m2/gm2-libs-iso/ClientSocket.mod
index 5de118c..15a194d 100644
--- a/gcc/m2/gm2-libs-iso/ClientSocket.mod
+++ b/gcc/m2/gm2-libs-iso/ClientSocket.mod
@@ -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;
diff --git a/gcc/m2/gm2-libs-iso/EXCEPTIONS.def b/gcc/m2/gm2-libs-iso/EXCEPTIONS.def
index 40d6aa5..d037b7e 100644
--- a/gcc/m2/gm2-libs-iso/EXCEPTIONS.def
+++ b/gcc/m2/gm2-libs-iso/EXCEPTIONS.def
@@ -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.
*)
diff --git a/gcc/m2/gm2-libs-iso/IOLink.def b/gcc/m2/gm2-libs-iso/IOLink.def
index f8c4c36..cae594b 100644
--- a/gcc/m2/gm2-libs-iso/IOLink.def
+++ b/gcc/m2/gm2-libs-iso/IOLink.def
@@ -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.
*)
diff --git a/gcc/m2/gm2-libs-iso/M2RTS.def b/gcc/m2/gm2-libs-iso/M2RTS.def
index 6958fd4..cca4ae6 100644
--- a/gcc/m2/gm2-libs-iso/M2RTS.def
+++ b/gcc/m2/gm2-libs-iso/M2RTS.def
@@ -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.
diff --git a/gcc/m2/gm2-libs-iso/SYSTEM.def b/gcc/m2/gm2-libs-iso/SYSTEM.def
index 716793b..f25fc6f 100644
--- a/gcc/m2/gm2-libs-iso/SYSTEM.def
+++ b/gcc/m2/gm2-libs-iso/SYSTEM.def
@@ -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
diff --git a/gcc/m2/gm2-libs-iso/TermFile.mod b/gcc/m2/gm2-libs-iso/TermFile.mod
index 42ea550..95090c0 100644
--- a/gcc/m2/gm2-libs-iso/TermFile.mod
+++ b/gcc/m2/gm2-libs-iso/TermFile.mod
@@ -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 ;
diff --git a/gcc/m2/gm2-libs-min/M2RTS.def b/gcc/m2/gm2-libs-min/M2RTS.def
index db8c5ae..65ffa8c 100644
--- a/gcc/m2/gm2-libs-min/M2RTS.def
+++ b/gcc/m2/gm2-libs-min/M2RTS.def
@@ -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) ;
diff --git a/gcc/m2/gm2-libs/FIO.mod b/gcc/m2/gm2-libs/FIO.mod
index 79435d7..94a1833 100644
--- a/gcc/m2/gm2-libs/FIO.mod
+++ b/gcc/m2/gm2-libs/FIO.mod
@@ -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 ;
diff --git a/gcc/m2/gm2-libs/M2RTS.def b/gcc/m2/gm2-libs/M2RTS.def
index b551725..167f964 100644
--- a/gcc/m2/gm2-libs/M2RTS.def
+++ b/gcc/m2/gm2-libs/M2RTS.def
@@ -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.
diff --git a/gcc/m2/gm2-libs/RTExceptions.def b/gcc/m2/gm2-libs/RTExceptions.def
index 71d8690..7d3b58d 100644
--- a/gcc/m2/gm2-libs/RTExceptions.def
+++ b/gcc/m2/gm2-libs/RTExceptions.def
@@ -56,7 +56,7 @@ TYPE
PROCEDURE Raise (number: CARDINAL;
file: ADDRESS; line: CARDINAL;
column: CARDINAL; function: ADDRESS;
- message: ADDRESS) ;
+ message: ADDRESS) <* noreturn *> ;
(*
diff --git a/gcc/m2/gm2-libs/RTExceptions.mod b/gcc/m2/gm2-libs/RTExceptions.mod
index 1b725c6..8d3dc04 100644
--- a/gcc/m2/gm2-libs/RTExceptions.mod
+++ b/gcc/m2/gm2-libs/RTExceptions.mod
@@ -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 ;
diff --git a/gcc/m2/gm2-libs/SYSTEM.def b/gcc/m2/gm2-libs/SYSTEM.def
index 068086a..2f72ad1 100644
--- a/gcc/m2/gm2-libs/SYSTEM.def
+++ b/gcc/m2/gm2-libs/SYSTEM.def
@@ -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
diff --git a/gcc/m2/m2.flex b/gcc/m2/m2.flex
index 2937290..198088b 100644
--- a/gcc/m2/m2.flex
+++ b/gcc/m2/m2.flex
@@ -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) {}
diff --git a/gcc/m2/mc-boot-ch/GBuiltins.c b/gcc/m2/mc-boot-ch/GBuiltins.c
index 30b07e3..28a41c0 100644
--- a/gcc/m2/mc-boot-ch/GBuiltins.c
+++ b/gcc/m2/mc-boot-ch/GBuiltins.c
@@ -38,6 +38,6 @@ _M2_Builtins_init (void)
EXTERN
void
-_M2_Builtins_finish (void)
+_M2_Builtins_fini (void)
{
}
diff --git a/gcc/m2/mc-boot-ch/GRTco.c b/gcc/m2/mc-boot-ch/GRTco.c
index 6365d5e..cb6f515 100644
--- a/gcc/m2/mc-boot-ch/GRTco.c
+++ b/gcc/m2/mc-boot-ch/GRTco.c
@@ -122,6 +122,6 @@ _M2_RTco_init (void)
EXTERN
void
-_M2_RTco_finish (void)
+_M2_RTco_fini (void)
{
}
diff --git a/gcc/m2/mc-boot-ch/GSYSTEM.c b/gcc/m2/mc-boot-ch/GSYSTEM.c
index 8b42999..dc63f70 100644
--- a/gcc/m2/mc-boot-ch/GSYSTEM.c
+++ b/gcc/m2/mc-boot-ch/GSYSTEM.c
@@ -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)
{
}
diff --git a/gcc/m2/mc-boot-ch/GSelective.c b/gcc/m2/mc-boot-ch/GSelective.c
index cf8b541..e41e848 100644
--- a/gcc/m2/mc-boot-ch/GSelective.c
+++ b/gcc/m2/mc-boot-ch/GSelective.c
@@ -270,6 +270,6 @@ _M2_Selective_init ()
EXTERN
void
-_M2_Selective_finish ()
+_M2_Selective_fini ()
{
}
diff --git a/gcc/m2/mc-boot-ch/GSysExceptions.c b/gcc/m2/mc-boot-ch/GSysExceptions.c
index 9467009..d39827e 100644
--- a/gcc/m2/mc-boot-ch/GSysExceptions.c
+++ b/gcc/m2/mc-boot-ch/GSysExceptions.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot-ch/GUnixArgs.cc b/gcc/m2/mc-boot-ch/GUnixArgs.cc
index 4cd5d3c..29b8ec2 100644
--- a/gcc/m2/mc-boot-ch/GUnixArgs.cc
+++ b/gcc/m2/mc-boot-ch/GUnixArgs.cc
@@ -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);
}
diff --git a/gcc/m2/mc-boot-ch/Gdtoa.c b/gcc/m2/mc-boot-ch/Gdtoa.c
index a400bf8..77a7ae5 100644
--- a/gcc/m2/mc-boot-ch/Gdtoa.c
+++ b/gcc/m2/mc-boot-ch/Gdtoa.c
@@ -174,7 +174,7 @@ _M2_dtoa_init (void)
}
void
-_M2_dtoa_finish (void)
+_M2_dtoa_fini (void)
{
}
#endif
diff --git a/gcc/m2/mc-boot-ch/Gerrno.c b/gcc/m2/mc-boot-ch/Gerrno.c
index 26756f6..c65c486 100644
--- a/gcc/m2/mc-boot-ch/Gerrno.c
+++ b/gcc/m2/mc-boot-ch/Gerrno.c
@@ -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)
{
}
diff --git a/gcc/m2/mc-boot-ch/Gldtoa.c b/gcc/m2/mc-boot-ch/Gldtoa.c
index 7c69535..a918cfc 100644
--- a/gcc/m2/mc-boot-ch/Gldtoa.c
+++ b/gcc/m2/mc-boot-ch/Gldtoa.c
@@ -99,7 +99,7 @@ _M2_ldtoa_init (void)
}
void
-_M2_ldtoa_finish (void)
+_M2_ldtoa_fini (void)
{
}
# ifdef __cplusplus
diff --git a/gcc/m2/mc-boot-ch/Gtermios.cc b/gcc/m2/mc-boot-ch/Gtermios.cc
index 9522708..e6f6ac8 100644
--- a/gcc/m2/mc-boot-ch/Gtermios.cc
+++ b/gcc/m2/mc-boot-ch/Gtermios.cc
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot-ch/Gwrapc.c b/gcc/m2/mc-boot-ch/Gwrapc.c
index 7c3a431..5753f5d 100644
--- a/gcc/m2/mc-boot-ch/Gwrapc.c
+++ b/gcc/m2/mc-boot-ch/Gwrapc.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GASCII.c b/gcc/m2/mc-boot/GASCII.c
index 0878561..2f768ce 100644
--- a/gcc/m2/mc-boot/GASCII.c
+++ b/gcc/m2/mc-boot/GASCII.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GArgs.c b/gcc/m2/mc-boot/GArgs.c
index bcb1b13..106ddfd 100644
--- a/gcc/m2/mc-boot/GArgs.c
+++ b/gcc/m2/mc-boot/GArgs.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GAssertion.c b/gcc/m2/mc-boot/GAssertion.c
index f8d4897..21ee6c0 100644
--- a/gcc/m2/mc-boot/GAssertion.c
+++ b/gcc/m2/mc-boot/GAssertion.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GBreak.c b/gcc/m2/mc-boot/GBreak.c
index 44e1e6f..9be003b 100644
--- a/gcc/m2/mc-boot/GBreak.c
+++ b/gcc/m2/mc-boot/GBreak.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GCmdArgs.c b/gcc/m2/mc-boot/GCmdArgs.c
index d5d62e5..c304a40 100644
--- a/gcc/m2/mc-boot/GCmdArgs.c
+++ b/gcc/m2/mc-boot/GCmdArgs.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GDebug.c b/gcc/m2/mc-boot/GDebug.c
index 26d9b8c..6329abb 100644
--- a/gcc/m2/mc-boot/GDebug.c
+++ b/gcc/m2/mc-boot/GDebug.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GDynamicStrings.c b/gcc/m2/mc-boot/GDynamicStrings.c
index a28b641..dfc1636 100644
--- a/gcc/m2/mc-boot/GDynamicStrings.c
+++ b/gcc/m2/mc-boot/GDynamicStrings.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GEnvironment.c b/gcc/m2/mc-boot/GEnvironment.c
index fb1fb8c..aa5e766 100644
--- a/gcc/m2/mc-boot/GEnvironment.c
+++ b/gcc/m2/mc-boot/GEnvironment.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GFIO.c b/gcc/m2/mc-boot/GFIO.c
index 74cd858..1ae6bb6 100644
--- a/gcc/m2/mc-boot/GFIO.c
+++ b/gcc/m2/mc-boot/GFIO.c
@@ -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 ();
}
diff --git a/gcc/m2/mc-boot/GFormatStrings.c b/gcc/m2/mc-boot/GFormatStrings.c
index 7710c8a..78e7a5a 100644
--- a/gcc/m2/mc-boot/GFormatStrings.c
+++ b/gcc/m2/mc-boot/GFormatStrings.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GFpuIO.c b/gcc/m2/mc-boot/GFpuIO.c
index 8265df1..205c27b 100644
--- a/gcc/m2/mc-boot/GFpuIO.c
+++ b/gcc/m2/mc-boot/GFpuIO.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GIO.c b/gcc/m2/mc-boot/GIO.c
index ad13f97..e56c743 100644
--- a/gcc/m2/mc-boot/GIO.c
+++ b/gcc/m2/mc-boot/GIO.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GIndexing.c b/gcc/m2/mc-boot/GIndexing.c
index c809e4b..0817ff3 100644
--- a/gcc/m2/mc-boot/GIndexing.c
+++ b/gcc/m2/mc-boot/GIndexing.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GM2Dependent.c b/gcc/m2/mc-boot/GM2Dependent.c
index fb22f1b..0057018 100644
--- a/gcc/m2/mc-boot/GM2Dependent.c
+++ b/gcc/m2/mc-boot/GM2Dependent.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GM2EXCEPTION.c b/gcc/m2/mc-boot/GM2EXCEPTION.c
index 7915442..387b047 100644
--- a/gcc/m2/mc-boot/GM2EXCEPTION.c
+++ b/gcc/m2/mc-boot/GM2EXCEPTION.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GM2RTS.c b/gcc/m2/mc-boot/GM2RTS.c
index 1b08741..8a65ae2 100644
--- a/gcc/m2/mc-boot/GM2RTS.c
+++ b/gcc/m2/mc-boot/GM2RTS.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GM2RTS.h b/gcc/m2/mc-boot/GM2RTS.h
index 5db589e..8e95e9c 100644
--- a/gcc/m2/mc-boot/GM2RTS.h
+++ b/gcc/m2/mc-boot/GM2RTS.h
@@ -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
diff --git a/gcc/m2/mc-boot/GMemUtils.c b/gcc/m2/mc-boot/GMemUtils.c
index e2af566..a80e00e 100644
--- a/gcc/m2/mc-boot/GMemUtils.c
+++ b/gcc/m2/mc-boot/GMemUtils.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GNumberIO.c b/gcc/m2/mc-boot/GNumberIO.c
index be47495..53bac45 100644
--- a/gcc/m2/mc-boot/GNumberIO.c
+++ b/gcc/m2/mc-boot/GNumberIO.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GPushBackInput.c b/gcc/m2/mc-boot/GPushBackInput.c
index 6812343..e15b3eb 100644
--- a/gcc/m2/mc-boot/GPushBackInput.c
+++ b/gcc/m2/mc-boot/GPushBackInput.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GRTExceptions.c b/gcc/m2/mc-boot/GRTExceptions.c
index a6aa806..23f8fed 100644
--- a/gcc/m2/mc-boot/GRTExceptions.c
+++ b/gcc/m2/mc-boot/GRTExceptions.c
@@ -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 ();
}
diff --git a/gcc/m2/mc-boot/GRTExceptions.h b/gcc/m2/mc-boot/GRTExceptions.h
index 9f36bdd..3f8e64d 100644
--- a/gcc/m2/mc-boot/GRTExceptions.h
+++ b/gcc/m2/mc-boot/GRTExceptions.h
@@ -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.
diff --git a/gcc/m2/mc-boot/GRTco.h b/gcc/m2/mc-boot/GRTco.h
index c80395b..180c495 100644
--- a/gcc/m2/mc-boot/GRTco.h
+++ b/gcc/m2/mc-boot/GRTco.h
@@ -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
index 0000000..9fc2492
--- /dev/null
+++ b/gcc/m2/mc-boot/GRTentity.h
@@ -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
diff --git a/gcc/m2/mc-boot/GRTint.c b/gcc/m2/mc-boot/GRTint.c
index d8cac27..bc83e46 100644
--- a/gcc/m2/mc-boot/GRTint.c
+++ b/gcc/m2/mc-boot/GRTint.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GSArgs.c b/gcc/m2/mc-boot/GSArgs.c
index fb6b953..143d278 100644
--- a/gcc/m2/mc-boot/GSArgs.c
+++ b/gcc/m2/mc-boot/GSArgs.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GSFIO.c b/gcc/m2/mc-boot/GSFIO.c
index 23c9a37..1a80013 100644
--- a/gcc/m2/mc-boot/GSFIO.c
+++ b/gcc/m2/mc-boot/GSFIO.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GStdIO.c b/gcc/m2/mc-boot/GStdIO.c
index 8bb03af..41affe2 100644
--- a/gcc/m2/mc-boot/GStdIO.c
+++ b/gcc/m2/mc-boot/GStdIO.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GStorage.c b/gcc/m2/mc-boot/GStorage.c
index e056089..5dac021 100644
--- a/gcc/m2/mc-boot/GStorage.c
+++ b/gcc/m2/mc-boot/GStorage.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GStrCase.c b/gcc/m2/mc-boot/GStrCase.c
index bf0986c..e3491b6 100644
--- a/gcc/m2/mc-boot/GStrCase.c
+++ b/gcc/m2/mc-boot/GStrCase.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GStrIO.c b/gcc/m2/mc-boot/GStrIO.c
index 8d3b106..1e091bc 100644
--- a/gcc/m2/mc-boot/GStrIO.c
+++ b/gcc/m2/mc-boot/GStrIO.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GStrLib.c b/gcc/m2/mc-boot/GStrLib.c
index e212c30..537eeb9 100644
--- a/gcc/m2/mc-boot/GStrLib.c
+++ b/gcc/m2/mc-boot/GStrLib.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GStringConvert.c b/gcc/m2/mc-boot/GStringConvert.c
index 8b87e0b..faa5e34 100644
--- a/gcc/m2/mc-boot/GStringConvert.c
+++ b/gcc/m2/mc-boot/GStringConvert.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GSysStorage.c b/gcc/m2/mc-boot/GSysStorage.c
index d5218fb..98c03f6 100644
--- a/gcc/m2/mc-boot/GSysStorage.c
+++ b/gcc/m2/mc-boot/GSysStorage.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GTimeString.c b/gcc/m2/mc-boot/GTimeString.c
index 1af8024..7e50f4b 100644
--- a/gcc/m2/mc-boot/GTimeString.c
+++ b/gcc/m2/mc-boot/GTimeString.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Galists.c b/gcc/m2/mc-boot/Galists.c
index 3800f45..3e84a50 100644
--- a/gcc/m2/mc-boot/Galists.c
+++ b/gcc/m2/mc-boot/Galists.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gdecl.c b/gcc/m2/mc-boot/Gdecl.c
index 6511cbb..ff8298c 100644
--- a/gcc/m2/mc-boot/Gdecl.c
+++ b/gcc/m2/mc-boot/Gdecl.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gkeyc.c b/gcc/m2/mc-boot/Gkeyc.c
index e000bfe..e089ac9 100644
--- a/gcc/m2/mc-boot/Gkeyc.c
+++ b/gcc/m2/mc-boot/Gkeyc.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Glists.c b/gcc/m2/mc-boot/Glists.c
index 5bfc035..63bced7 100644
--- a/gcc/m2/mc-boot/Glists.c
+++ b/gcc/m2/mc-boot/Glists.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcComment.c b/gcc/m2/mc-boot/GmcComment.c
index 4dfad51..2e60c7a 100644
--- a/gcc/m2/mc-boot/GmcComment.c
+++ b/gcc/m2/mc-boot/GmcComment.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcComp.c b/gcc/m2/mc-boot/GmcComp.c
index e6b4e35..8a79413 100644
--- a/gcc/m2/mc-boot/GmcComp.c
+++ b/gcc/m2/mc-boot/GmcComp.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcDebug.c b/gcc/m2/mc-boot/GmcDebug.c
index 8cac40e..db45ae8 100644
--- a/gcc/m2/mc-boot/GmcDebug.c
+++ b/gcc/m2/mc-boot/GmcDebug.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcError.c b/gcc/m2/mc-boot/GmcError.c
index 647adfd..cf96ceb 100644
--- a/gcc/m2/mc-boot/GmcError.c
+++ b/gcc/m2/mc-boot/GmcError.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcFileName.c b/gcc/m2/mc-boot/GmcFileName.c
index b41bcf6..3413d89 100644
--- a/gcc/m2/mc-boot/GmcFileName.c
+++ b/gcc/m2/mc-boot/GmcFileName.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcLexBuf.c b/gcc/m2/mc-boot/GmcLexBuf.c
index 5697885..d310e87 100644
--- a/gcc/m2/mc-boot/GmcLexBuf.c
+++ b/gcc/m2/mc-boot/GmcLexBuf.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcMetaError.c b/gcc/m2/mc-boot/GmcMetaError.c
index 3073e62..4d40685 100644
--- a/gcc/m2/mc-boot/GmcMetaError.c
+++ b/gcc/m2/mc-boot/GmcMetaError.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcOptions.c b/gcc/m2/mc-boot/GmcOptions.c
index 77801c0..40f4154 100644
--- a/gcc/m2/mc-boot/GmcOptions.c
+++ b/gcc/m2/mc-boot/GmcOptions.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcPreprocess.c b/gcc/m2/mc-boot/GmcPreprocess.c
index df335c0..91a5093 100644
--- a/gcc/m2/mc-boot/GmcPreprocess.c
+++ b/gcc/m2/mc-boot/GmcPreprocess.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcPretty.c b/gcc/m2/mc-boot/GmcPretty.c
index 674db94..1184514 100644
--- a/gcc/m2/mc-boot/GmcPretty.c
+++ b/gcc/m2/mc-boot/GmcPretty.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcPrintf.c b/gcc/m2/mc-boot/GmcPrintf.c
index 0bfe898..a8660a5 100644
--- a/gcc/m2/mc-boot/GmcPrintf.c
+++ b/gcc/m2/mc-boot/GmcPrintf.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcQuiet.c b/gcc/m2/mc-boot/GmcQuiet.c
index 8811576..bcf1026 100644
--- a/gcc/m2/mc-boot/GmcQuiet.c
+++ b/gcc/m2/mc-boot/GmcQuiet.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcReserved.c b/gcc/m2/mc-boot/GmcReserved.c
index a1221f9..60b8796 100644
--- a/gcc/m2/mc-boot/GmcReserved.c
+++ b/gcc/m2/mc-boot/GmcReserved.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcSearch.c b/gcc/m2/mc-boot/GmcSearch.c
index 08b9312..a4541fa 100644
--- a/gcc/m2/mc-boot/GmcSearch.c
+++ b/gcc/m2/mc-boot/GmcSearch.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcStack.c b/gcc/m2/mc-boot/GmcStack.c
index a1f13d8..95d31a5 100644
--- a/gcc/m2/mc-boot/GmcStack.c
+++ b/gcc/m2/mc-boot/GmcStack.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GmcStream.c b/gcc/m2/mc-boot/GmcStream.c
index 43cf461..e4ce052 100644
--- a/gcc/m2/mc-boot/GmcStream.c
+++ b/gcc/m2/mc-boot/GmcStream.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gmcp1.c b/gcc/m2/mc-boot/Gmcp1.c
index 6c9c849..97bedb2 100644
--- a/gcc/m2/mc-boot/Gmcp1.c
+++ b/gcc/m2/mc-boot/Gmcp1.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gmcp2.c b/gcc/m2/mc-boot/Gmcp2.c
index f336ac2..85fd193 100644
--- a/gcc/m2/mc-boot/Gmcp2.c
+++ b/gcc/m2/mc-boot/Gmcp2.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gmcp3.c b/gcc/m2/mc-boot/Gmcp3.c
index 03a361a..4ff8d80 100644
--- a/gcc/m2/mc-boot/Gmcp3.c
+++ b/gcc/m2/mc-boot/Gmcp3.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gmcp4.c b/gcc/m2/mc-boot/Gmcp4.c
index 50e4ddb..5eab5ae 100644
--- a/gcc/m2/mc-boot/Gmcp4.c
+++ b/gcc/m2/mc-boot/Gmcp4.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gmcp5.c b/gcc/m2/mc-boot/Gmcp5.c
index 1806d15..9af8aac 100644
--- a/gcc/m2/mc-boot/Gmcp5.c
+++ b/gcc/m2/mc-boot/Gmcp5.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GnameKey.c b/gcc/m2/mc-boot/GnameKey.c
index 11cb6fa..b00a598 100644
--- a/gcc/m2/mc-boot/GnameKey.c
+++ b/gcc/m2/mc-boot/GnameKey.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/GsymbolKey.c b/gcc/m2/mc-boot/GsymbolKey.c
index e72133e..8c16a63 100644
--- a/gcc/m2/mc-boot/GsymbolKey.c
+++ b/gcc/m2/mc-boot/GsymbolKey.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gtop.c b/gcc/m2/mc-boot/Gtop.c
index f00e1be..20c9613 100644
--- a/gcc/m2/mc-boot/Gtop.c
+++ b/gcc/m2/mc-boot/Gtop.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gvarargs.c b/gcc/m2/mc-boot/Gvarargs.c
index 30f76e2..faf7f77 100644
--- a/gcc/m2/mc-boot/Gvarargs.c
+++ b/gcc/m2/mc-boot/Gvarargs.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc-boot/Gwlists.c b/gcc/m2/mc-boot/Gwlists.c
index aa490ef..c8daafd 100644
--- a/gcc/m2/mc-boot/Gwlists.c
+++ b/gcc/m2/mc-boot/Gwlists.c
@@ -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[])
{
}
diff --git a/gcc/m2/mc/decl.mod b/gcc/m2/mc/decl.mod
index f6afd66..3550fd6 100644
--- a/gcc/m2/mc/decl.mod
+++ b/gcc/m2/mc/decl.mod
@@ -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[]") ;
diff --git a/gcc/m2/mc/mc.flex b/gcc/m2/mc/mc.flex
index 0ce9ba5..4b37755 100644
--- a/gcc/m2/mc/mc.flex
+++ b/gcc/m2/mc/mc.flex
@@ -733,6 +733,11 @@ _M2_mcflex_init (void)
}
void
+_M2_mcflex_fini (void)
+{
+}
+
+void
_M2_mcflex_finish (void)
{
}
diff --git a/gcc/m2/tools-src/mklink.c b/gcc/m2/tools-src/mklink.c
index a460c24..2027f75 100644
--- a/gcc/m2/tools-src/mklink.c
+++ b/gcc/m2/tools-src/mklink.c
@@ -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;