diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in index 03677d9e5ea..47a5b2f0759 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 fdb0758add7..d2339b370f2 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=$@ $< - -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=$@ $< - -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=$@ $< - -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=$@ $< - -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)%.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)%.h: $(srcdir)/m2/gm2-libs/%.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)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 -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 -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 -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 -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 678f31024e5..9739c761d64 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 3436d17c3c8..cc3aa4cc961 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 445c039a0c2..ef1859f46e7 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 f32f7ee69e9..caca8a3f795 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 3b6ed4531e9..17062b9a278 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 8242584c82e..4908578fd50 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 ab7df804558..b3cd6515173 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 58edecfea34..a4f5b68b324 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 3b484341680..5a66d20b9cf 100644 --- a/gcc/m2/gm2-libs-coroutines/SYSTEM.def +++ b/gcc/m2/gm2-libs-coroutines/SYSTEM.def @@ -171,7 +171,7 @@ PROCEDURE SHIFT (val: ; 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 5de118c1026..15a194da587 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 40d6aa59a31..d037b7e6877 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 f8c4c36cce4..cae594b8a4b 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 6958fd41667..cca4ae64189 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 716793b706f..f25fc6ff3a2 100644 --- a/gcc/m2/gm2-libs-iso/SYSTEM.def +++ b/gcc/m2/gm2-libs-iso/SYSTEM.def @@ -133,7 +133,7 @@ PROCEDURE TSIZE (; ... ): 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 42ea5501c9a..95090c0ecd8 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 db8c5ae4f63..65ffa8c5367 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 79435d739cc..94a183301c3 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 b551725126e..167f96423e2 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 71d86904518..7d3b58d5618 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 1b725c6dac8..8d3dc04ff0f 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 068086aa688..2f72ad1718c 100644 --- a/gcc/m2/gm2-libs/SYSTEM.def +++ b/gcc/m2/gm2-libs/SYSTEM.def @@ -89,7 +89,7 @@ PROCEDURE SHIFT (val: ; 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 2937290635c..198088beeff 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 30b07e3a9c2..28a41c0427a 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 6365d5ee0b1..cb6f5152f5a 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 8b42999fea5..dc63f700f4b 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 cf8b541ec40..e41e848986d 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 94670096386..d39827e7623 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 4cd5d3ceef5..29b8ec27323 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 a400bf80f7b..77a7ae50e02 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 26756f67808..c65c48630af 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 7c69535f38f..a918cfc2d67 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 952270894b4..e6f6ac898b3 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 7c3a431f856..5753f5db8e2 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 0878561cd31..2f768ce24c8 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 bcb1b132365..106ddfd30c6 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 f8d4897517d..21ee6c0b2f2 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 44e1e6f0eb8..9be003bd619 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 d5d62e52400..c304a407182 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 26d9b8c0dda..6329abb11b1 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 a28b641c47a..dfc163646bb 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 fb1fb8cdd4b..aa5e7662873 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 74cd8580cf5..1ae6bb63f20 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 7710c8aae42..78e7a5a559c 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 8265df11aa2..205c27b811e 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 ad13f97fc38..e56c74382f5 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 c809e4b9b6e..0817ff36ca2 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 fb22f1b9145..0057018c979 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 7915442b6e1..387b0476462 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 1b08741181b..8a65ae2a116 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 5db589e2597..8e95e9c79b8 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 e2af566ee14..a80e00ecec8 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 be47495cf22..53bac45552c 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 6812343de8c..e15b3eb9007 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 a6aa8069f05..23f8fede117 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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 612, 9, const_cast (reinterpret_cast("indexf")), const_cast (reinterpret_cast("array index out of bounds"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast (reinterpret_cast("indexf")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 624, 9, const_cast (reinterpret_cast("range")), const_cast (reinterpret_cast("assignment out of range"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast (reinterpret_cast("range")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 636, 9, const_cast (reinterpret_cast("casef")), const_cast (reinterpret_cast("case selector out of range"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast (reinterpret_cast("casef")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 648, 9, const_cast (reinterpret_cast("invalidloc")), const_cast (reinterpret_cast("invalid address referenced"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast (reinterpret_cast("invalidloc")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 660, 9, const_cast (reinterpret_cast("function")), const_cast (reinterpret_cast("... function ... "))); /* --fixme-- what has happened ? */ + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast (reinterpret_cast("function")), const_cast (reinterpret_cast("... 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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 672, 9, const_cast (reinterpret_cast("wholevalue")), const_cast (reinterpret_cast("illegal whole value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast (reinterpret_cast("wholevalue")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 684, 9, const_cast (reinterpret_cast("wholediv")), const_cast (reinterpret_cast("illegal whole value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast (reinterpret_cast("wholediv")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 696, 9, const_cast (reinterpret_cast("realvalue")), const_cast (reinterpret_cast("illegal real value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast (reinterpret_cast("realvalue")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 708, 9, const_cast (reinterpret_cast("realdiv")), const_cast (reinterpret_cast("real number division by zero exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast (reinterpret_cast("realdiv")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 720, 9, const_cast (reinterpret_cast("complexvalue")), const_cast (reinterpret_cast("illegal complex value exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast (reinterpret_cast("complexvalue")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 732, 9, const_cast (reinterpret_cast("complexdiv")), const_cast (reinterpret_cast("complex number division by zero exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast (reinterpret_cast("complexdiv")), const_cast (reinterpret_cast("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 (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 744, 9, const_cast (reinterpret_cast("protection")), const_cast (reinterpret_cast("protection exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast (reinterpret_cast("protection")), const_cast (reinterpret_cast("protection exception"))); } @@ -839,7 +841,7 @@ static void protection (void * a) static void systemf (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 756, 9, const_cast (reinterpret_cast("systemf")), const_cast (reinterpret_cast("system exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast (reinterpret_cast("systemf")), const_cast (reinterpret_cast("system exception"))); } @@ -849,7 +851,7 @@ static void systemf (void * a) static void coroutine (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 768, 9, const_cast (reinterpret_cast("coroutine")), const_cast (reinterpret_cast("coroutine exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast (reinterpret_cast("coroutine")), const_cast (reinterpret_cast("coroutine exception"))); } @@ -859,7 +861,7 @@ static void coroutine (void * a) static void exception (void * a) { - RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 780, 9, const_cast (reinterpret_cast("exception")), const_cast (reinterpret_cast("exception exception"))); + RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast (reinterpret_cast("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast (reinterpret_cast("exception")), const_cast (reinterpret_cast("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 9f36bdd9eea..3f8e64dc7f3 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 c80395b8ffc..180c495a9a2 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 00000000000..9fc2492b123 --- /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 . + +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 +. */ + + +#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 d8cac277252..bc83e46c279 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 fb6b9534425..143d2783c16 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 23c9a378fb6..1a800138812 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 8bb03af9e3e..41affe2a054 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 e0560890035..5dac021d866 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 bf0986c5e8b..e3491b6d75b 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 8d3b106f79d..1e091bce545 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 e212c301d2d..537eeb96356 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 8b87e0bda25..faa5e34459e 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 d5218fb4b42..98c03f66c35 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 1af8024c67f..7e50f4b7551 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 3800f450802..3e84a500337 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 6511cbb28e3..ff8298c73cc 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 e000bfe60f0..e089ac95250 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 5bfc035514d..63bced70ffd 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 4dfad51f4a8..2e60c7aa567 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 e6b4e35bffe..8a79413add4 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 8cac40ea033..db45ae8ac87 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 647adfd3a09..cf96ceb79bd 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 b41bcf6debe..3413d8949d3 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 5697885a83c..d310e87929d 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 3073e62139a..4d406851d0b 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 77801c04f05..40f4154518d 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 df335c08e20..91a50939d80 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 674db9443a5..1184514fd25 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 0bfe898e155..a8660a50f4c 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 88115761c8b..bcf1026001a 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 a1221f9d85e..60b879630bb 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 08b9312c22f..a4541fa0d37 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 a1f13d8f19c..95d31a5037b 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 43cf461af3b..e4ce0528cf5 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 6c9c84962c4..97bedb25714 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 f336ac23a45..85fd19326df 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 03a361a6dfd..4ff8d80307a 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 50e4ddb89bd..5eab5ae58ed 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 1806d156e54..9af8aac9dd5 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 11cb6fa92e4..b00a59868e4 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 e72133ea3fd..8c16a63474e 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 f00e1be196b..20c96133c20 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 30f76e20362..faf7f7703d8 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 aa490ef3b86..c8daafd4ff8 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 f6afd666eb6..3550fd606a5 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 0ce9ba5453c..4b37755bbc2 100644 --- a/gcc/m2/mc/mc.flex +++ b/gcc/m2/mc/mc.flex @@ -732,6 +732,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 a460c249e18..2027f75c733 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; diff --git a/libgm2/libm2cor/Makefile.am b/libgm2/libm2cor/Makefile.am index a03af21a8a7..662a440f40c 100644 --- a/libgm2/libm2cor/Makefile.am +++ b/libgm2/libm2cor/Makefile.am @@ -113,7 +113,7 @@ nodist_EXTRA_libm2cor_la_SOURCES = dummy.c ## forces automake to generate the L libm2cordir = libm2cor libm2cor_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2cor_la_SOURCES))) libm2cor_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso -libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g +libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase if TARGET_DARWIN libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2cor/Makefile.in b/libgm2/libm2cor/Makefile.in index 176ca55d15c..ca3ddd08e1b 100644 --- a/libgm2/libm2cor/Makefile.in +++ b/libgm2/libm2cor/Makefile.in @@ -463,7 +463,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_CORLIB_TRUE@libm2cordir = libm2cor @BUILD_CORLIB_TRUE@libm2cor_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2cor_la_SOURCES))) @BUILD_CORLIB_TRUE@libm2cor_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso -@BUILD_CORLIB_TRUE@libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g +@BUILD_CORLIB_TRUE@libm2cor_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs-coroutines -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase @BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@libm2cor_la_link_flags = @BUILD_CORLIB_TRUE@@TARGET_DARWIN_TRUE@libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup @BUILD_CORLIB_TRUE@libm2cor_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2cor_la_link_flags) diff --git a/libgm2/libm2iso/Makefile.am b/libgm2/libm2iso/Makefile.am index 843b595b39e..cc9a4773c1d 100644 --- a/libgm2/libm2iso/Makefile.am +++ b/libgm2/libm2iso/Makefile.am @@ -186,7 +186,7 @@ C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include libm2isodir = libm2iso libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES))) libm2iso_la_CFLAGS = $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include -libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g +libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g -Wreturn-type -fcase if TARGET_DARWIN libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in index 55cafa233b3..b96136ad1ad 100644 --- a/libgm2/libm2iso/Makefile.in +++ b/libgm2/libm2iso/Makefile.in @@ -563,7 +563,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_ISOLIB_TRUE@libm2isodir = libm2iso @BUILD_ISOLIB_TRUE@libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES))) @BUILD_ISOLIB_TRUE@libm2iso_la_CFLAGS = $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include -@BUILD_ISOLIB_TRUE@libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g +@BUILD_ISOLIB_TRUE@libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g -Wreturn-type -fcase @BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@libm2iso_la_link_flags = @BUILD_ISOLIB_TRUE@@TARGET_DARWIN_TRUE@libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup @BUILD_ISOLIB_TRUE@libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags) diff --git a/libgm2/libm2log/Makefile.am b/libgm2/libm2log/Makefile.am index e8e4581adaf..450673f9d3d 100644 --- a/libgm2/libm2log/Makefile.am +++ b/libgm2/libm2log/Makefile.am @@ -131,7 +131,7 @@ libm2log_la_SOURCES = $(M2MODS) Break.c libm2log_la_DEPENDENCIES = ../libm2pim/SYSTEM.def $(addsuffix .lo, $(basename $(libm2log_la_SOURCES))) libm2log_la_CFLAGS = -I. -DBUILD_GM2_LIBS -I@srcdir@/../ -libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso +libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -Wreturn-type -fcase if TARGET_DARWIN libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in index 11e25cab741..c8d36a3e766 100644 --- a/libgm2/libm2log/Makefile.in +++ b/libgm2/libm2log/Makefile.in @@ -471,7 +471,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_LOGLIB_TRUE@libm2log_la_SOURCES = $(M2MODS) Break.c @BUILD_LOGLIB_TRUE@libm2log_la_DEPENDENCIES = ../libm2pim/SYSTEM.def $(addsuffix .lo, $(basename $(libm2log_la_SOURCES))) @BUILD_LOGLIB_TRUE@libm2log_la_CFLAGS = -I. -DBUILD_GM2_LIBS -I@srcdir@/../ -@BUILD_LOGLIB_TRUE@libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso +@BUILD_LOGLIB_TRUE@libm2log_la_M2FLAGS = -I../libm2pim -I$(GM2_SRC)/gm2-libs-log -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -Wreturn-type -fcase @BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@libm2log_la_link_flags = @BUILD_LOGLIB_TRUE@@TARGET_DARWIN_TRUE@libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup @BUILD_LOGLIB_TRUE@libm2log_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2log_la_link_flags) diff --git a/libgm2/libm2pim/Makefile.am b/libgm2/libm2pim/Makefile.am index aa4c4c89bfc..7bb08c0712c 100644 --- a/libgm2/libm2pim/Makefile.am +++ b/libgm2/libm2pim/Makefile.am @@ -166,7 +166,7 @@ libm2pim_la_SOURCES = $(M2MODS) \ libm2pimdir = libm2pim libm2pim_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2pim_la_SOURCES))) libm2pim_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso -libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g +libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase if TARGET_DARWIN libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in index 7d81a7a86fc..7a59893553c 100644 --- a/libgm2/libm2pim/Makefile.in +++ b/libgm2/libm2pim/Makefile.in @@ -534,7 +534,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_PIMLIB_TRUE@libm2pimdir = libm2pim @BUILD_PIMLIB_TRUE@libm2pim_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2pim_la_SOURCES))) @BUILD_PIMLIB_TRUE@libm2pim_la_CFLAGS = -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso -@BUILD_PIMLIB_TRUE@libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g +@BUILD_PIMLIB_TRUE@libm2pim_la_M2FLAGS = -I. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso -fm2-g -g -Wreturn-type -fcase @BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@libm2pim_la_link_flags = @BUILD_PIMLIB_TRUE@@TARGET_DARWIN_TRUE@libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup @BUILD_PIMLIB_TRUE@libm2pim_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2pim_la_link_flags)