mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:50:33 +08:00
Fixup noreturn attributes in modula-2 [PR108551] and [PR108612]
PR108612 - m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control reaches end of non-void function [-Werror=return-type] PR108551 - gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] This patch adds missing return values to the procedure functions mentioned in PR108612 and PR108551. It corrects the noreturn attribute to throw and rethrow in the modula2 frontend. The patch also changes HALT, Halt, Raise procedures in the libraries to use the <* noreturn *> attribute. Finally the patch includes rebuilt bootstrap tools mc and pge. gcc/m2/ChangeLog: * Make-lang.in (GM2_FLAGS): Add -fno-return -Wreturn-type. (GM2_ISO_FLAGS): Add -fno-return -Wreturn-type. * Make-maintainer.in (GM2PATH): Split into separate -I components. (MC-LIB-DEFS): Add RTentity.def. (m2/boot-bin/mc-devel$(exeext)): Changed -I$(GM2PATH) to $(GM2PATH). (m2/boot-bin/mc-opt$(exeext)): Separate -I paths. (m2/mc/decl.o): Separate -I paths. (gm2-bootstrap): Separate -I paths. (m2/mc-boot-gen/$(SRC_PREFIX)%.h): Separate -I paths. (m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Separate -I paths. (m2/mc-boot-gen/$(SRC_PREFIX)%.c): Separate -I paths. (gm2.verifyparanoid): Separate -I paths. (gm2.verifystage12): Separate -I paths. * gm2-compiler/M2ALU.mod (GetConstructorElement): Add default Return NulSym. Remove return from the error case. * gm2-compiler/M2Base.mod (ComplexToScalar): Return RType from the error case. (MixMetaTypes): Return MakeError as a default. * gm2-compiler/M2GCCDeclare.mod (GetTypeMin): Return NulSym from the error case. (GetTypeMax): Return NulSym from the error case. * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Replace Assert by InternalError. * gm2-compiler/M2Quads.mod (GetItemPointedTo): Add InternalError. (GetTypeMin): Add InternalError. (GetTypeMax): Add InternalError. * gm2-compiler/M2System.mod (InitSystem): Call PutProcedureNoReturn on Throw. * gm2-gcc/m2except.cc (m2except_InitExceptions): fn_throw_tree declare as noreturn. fn_rethrow_tree declare as noreturn. * gm2-libs-coroutines/Debug.def (Halt): Add noreturn attribute. * gm2-libs-coroutines/SYSTEM.def (THROW): Add noreturn attribute. * gm2-libs-iso/ClientSocket.mod (dorbytes): Add return FALSE. * gm2-libs-iso/EXCEPTIONS.def (RAISE): Add noreturn attribute. * gm2-libs-iso/IOLink.def (RAISEdevException): Add noreturn attribute. * gm2-libs-iso/M2RTS.def (HALT): Add noreturn attribute. (Halt): Ditto. (HaltC): Ditto. (ErrorMessage): Ditto. (AssignmentException): Ditto. (ReturnException): Ditto. (IncException): Ditto. (DecException): Ditto. (InclException): Ditto. (ExclException): Ditto. (ShiftException): Ditto. (RotateException): Ditto. (StaticArraySubscriptException): Ditto. (DynamicArraySubscriptException): Ditto. (ForLoopBeginException): Ditto. (ForLoopToException): Ditto. (ForLoopEndException): Ditto. (PointerNilException): Ditto. (NoReturnException): Ditto. (CaseException): Ditto. (WholeNonPosDivException): Ditto. (WholeNonPosModException): Ditto. (WholeZeroDivException): Ditto. (WholeZeroRemException): Ditto. (WholeValueException): Ditto. (RealValueException): Ditto. (ParameterException): Ditto. (NoException): Ditto. * gm2-libs-iso/SYSTEM.def (THROW): Ditto. * gm2-libs-iso/TermFile.mod (dorbytes): Add default return FALSE. * gm2-libs-min/M2RTS.def: Add noreturn attribute. * gm2-libs/FIO.mod (BufferedRead): Return -1. (getFileName): Return NIL. (getFileNameLength): Return 0. * gm2-libs/M2RTS.def (HaltC): Add noreturn attribute. (AssignmentException): Ditto. (ReturnException): Ditto. (IncException): Ditto. (DecException): Ditto. (InclException): Ditto. (ExclException): Ditto. (ShiftException): Ditto. (RotateException): Ditto. (StaticArraySubscriptException): Ditto. (DynamicArraySubscriptException): Ditto. (ForLoopBeginException): Ditto. (ForLoopToException): Ditto. (ForLoopEndException): Ditto. (PointerNilException): Ditto. (NoReturnException): Ditto. (CaseException): Ditto. (WholeNonPosDivException): Ditto. (WholeNonPosModException): Ditto. (WholeZeroDivException): Ditto. (WholeZeroRemException): Ditto. (WholeValueException): Ditto. (RealValueException): Ditto. (ParameterException): Ditto. (NoException): Ditto. * gm2-libs/RTExceptions.def (Raise): Ditto. * gm2-libs/RTExceptions.mod (InvokeHandler): Ditto. * gm2-libs/SYSTEM.def (THROW): Ditto. * m2.flex (_M2_m2flex_fini): Remamed to... (_M2_m2flex_finish): ...here. * mc-boot-ch/GBuiltins.c (_M2_Builtins_finish): Remamed to... (_M2_Builtins_fini): ...this. * mc-boot-ch/GRTco.c (_M2_RTco_finish): Remamed to... (_M2_RTco_fini): ...this. * mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_finish): Remamed to... (_M2_SYSTEM_fini): ...this. * mc-boot-ch/GSelective.c (_M2_Selective_finish): Remamed to... (_M2_Selective_fini): ...this. * mc-boot-ch/GSysExceptions.c (_M2_SysExceptions_init): Add parameters. (_M2_SysExceptions_finish): Remamed to... (_M2_SysExceptions_fini): ...this. * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_finish): Remamed to... (_M2_UnixArgs_fini): ...this. (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): Change parameter to _M2_UnixArgs_fini. * mc-boot-ch/Gdtoa.c (_M2_dtoa_finish): Remamed to... (_M2_dtoa_fini): ...this. * mc-boot-ch/Gerrno.c (_M2_errno_finish): Remamed to... (_M2_errno_fini): ...this. * mc-boot-ch/Gldtoa.c (_M2_ldtoa_finish): Remamed to... (_M2_ldtoa_fini): ...this. * mc-boot-ch/Gtermios.cc (_M2_termios_init): Add parameters. (_M2_termios_finish): Remamed to... (_M2_termios_fini): ...this. * mc-boot-ch/Gwrapc.c (_M2_wrapc_init): Add parameters. (_M2_wrapc_finish): Remamed to... (_M2_wrapc_fini): ...this. * mc-boot/GASCII.c: Rebuild. * mc-boot/GArgs.c: Rebuild. * mc-boot/GAssertion.c: Rebuild. * mc-boot/GBreak.c: Rebuild. * mc-boot/GCmdArgs.c: Rebuild. * mc-boot/GDebug.c: Rebuild. * mc-boot/GDynamicStrings.c: Rebuild. * mc-boot/GEnvironment.c: Rebuild. * mc-boot/GFIO.c: Rebuild. * mc-boot/GFormatStrings.c: Rebuild. * mc-boot/GFpuIO.c: Rebuild. * mc-boot/GIO.c: Rebuild. * mc-boot/GIndexing.c: Rebuild. * mc-boot/GM2Dependent.c: Rebuild. * mc-boot/GM2EXCEPTION.c: Rebuild. * mc-boot/GM2RTS.c: Rebuild. * mc-boot/GM2RTS.h: Rebuild. * mc-boot/GMemUtils.c: Rebuild. * mc-boot/GNumberIO.c: Rebuild. * mc-boot/GPushBackInput.c: Rebuild. * mc-boot/GRTExceptions.c: Rebuild. * mc-boot/GRTExceptions.h: Rebuild. * mc-boot/GRTco.h: Rebuild. * mc-boot/GRTint.c: Rebuild. * mc-boot/GSArgs.c: Rebuild. * mc-boot/GSFIO.c: Rebuild. * mc-boot/GStdIO.c: Rebuild. * mc-boot/GStorage.c: Rebuild. * mc-boot/GStrCase.c: Rebuild. * mc-boot/GStrIO.c: Rebuild. * mc-boot/GStrLib.c: Rebuild. * mc-boot/GStringConvert.c: Rebuild. * mc-boot/GSysStorage.c: Rebuild. * mc-boot/GTimeString.c: Rebuild. * mc-boot/Galists.c: Rebuild. * mc-boot/Gdecl.c: Rebuild. * mc-boot/Gkeyc.c: Rebuild. * mc-boot/Glists.c: Rebuild. * mc-boot/GmcComment.c: Rebuild. * mc-boot/GmcComp.c: Rebuild. * mc-boot/GmcDebug.c: Rebuild. * mc-boot/GmcError.c: Rebuild. * mc-boot/GmcFileName.c: Rebuild. * mc-boot/GmcLexBuf.c: Rebuild. * mc-boot/GmcMetaError.c: Rebuild. * mc-boot/GmcOptions.c: Rebuild. * mc-boot/GmcPreprocess.c: Rebuild. * mc-boot/GmcPretty.c: Rebuild. * mc-boot/GmcPrintf.c: Rebuild. * mc-boot/GmcQuiet.c: Rebuild. * mc-boot/GmcReserved.c: Rebuild. * mc-boot/GmcSearch.c: Rebuild. * mc-boot/GmcStack.c: Rebuild. * mc-boot/GmcStream.c: Rebuild. * mc-boot/Gmcp1.c: Rebuild. * mc-boot/Gmcp2.c: Rebuild. * mc-boot/Gmcp3.c: Rebuild. * mc-boot/Gmcp4.c: Rebuild. * mc-boot/Gmcp5.c: Rebuild. * mc-boot/GnameKey.c: Rebuild. * mc-boot/GsymbolKey.c: Rebuild. * mc-boot/Gtop.c: Rebuild. * mc-boot/Gvarargs.c: Rebuild. * mc-boot/Gwlists.c: Rebuild. * mc-boot/GRTentity.h: New file. * mc/decl.mod (scaffoldStatic): Change _finish to _fini. * mc/mc.flex (_M2_mcflex_fini): New function. (_M2_mcflex_finish): Remove function. * tools-src/mklink.c (GenerateFinishCalls): Change _finish to _fini. (GeneratePrototypes): Change _finish to _fini. libgm2/ChangeLog: * libm2cor/Makefile.am (libm2cor_la_M2FLAGS): Add -Wreturn-type -fcase. * libm2cor/Makefile.in: Rebuild. * libm2iso/Makefile.am (libm2iso_la_M2FLAGS): Add -Wreturn-type -fcase. * libm2iso/Makefile.in: Rebuild. * libm2log/Makefile.am (libm2log_la_M2FLAGS): Add -Wreturn-type -fcase. * libm2log/Makefile.in: Rebuild. * libm2pim/Makefile.am (libm2pim_la_M2FLAGS): Add -Wreturn-type -fcase. * libm2pim/Makefile.in: Rebuild. PR modula2/108612 PR modula2/108551 Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
This commit is contained in:
parent
a939dd8357
commit
9fadd8dec7
@ -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 \
|
||||
|
@ -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]" ; \
|
||||
|
@ -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 ;
|
||||
|
||||
|
||||
|
@ -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 ;
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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. *)
|
||||
|
@ -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()) ;
|
||||
|
@ -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);
|
||||
|
@ -51,7 +51,7 @@ TYPE
|
||||
PROCEDURE Halt (File : ARRAY OF CHAR;
|
||||
LineNo : CARDINAL;
|
||||
Function,
|
||||
Message : ARRAY OF CHAR) ;
|
||||
Message : ARRAY OF CHAR) <* noreturn *> ;
|
||||
|
||||
|
||||
(*
|
||||
|
@ -171,7 +171,7 @@ PROCEDURE SHIFT (val: <a set type>;
|
||||
num is negative, otherwise the direction is up.
|
||||
*)
|
||||
|
||||
PROCEDURE THROW (i: INTEGER) ;
|
||||
PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
|
||||
(*
|
||||
THROW is a GNU extension and was not part of the PIM or ISO
|
||||
standards. It throws an exception which will be caught by the EXCEPT
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
*)
|
||||
|
@ -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.
|
||||
*)
|
||||
|
@ -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.
|
||||
|
@ -133,7 +133,7 @@ PROCEDURE TSIZE (<type>; ... ): CARDINAL;
|
||||
are used to distinguish variants in a variant record.
|
||||
*)
|
||||
|
||||
PROCEDURE THROW (i: INTEGER) ;
|
||||
PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
|
||||
(*
|
||||
THROW is a GNU extension and was not part of the PIM or ISO
|
||||
standards. It throws an exception which will be caught by the
|
||||
|
@ -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 ;
|
||||
|
@ -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) ;
|
||||
|
||||
|
@ -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 ;
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
@ -56,7 +56,7 @@ TYPE
|
||||
PROCEDURE Raise (number: CARDINAL;
|
||||
file: ADDRESS; line: CARDINAL;
|
||||
column: CARDINAL; function: ADDRESS;
|
||||
message: ADDRESS) ;
|
||||
message: ADDRESS) <* noreturn *> ;
|
||||
|
||||
|
||||
(*
|
||||
|
@ -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 ;
|
||||
|
||||
|
@ -89,7 +89,7 @@ PROCEDURE SHIFT (val: <a set type>;
|
||||
num is negative, otherwise the direction is up/left.
|
||||
*)
|
||||
|
||||
PROCEDURE THROW (i: INTEGER) ;
|
||||
PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
|
||||
(*
|
||||
THROW is a GNU extension and was not part of the PIM or ISO
|
||||
standards. It throws an exception which will be caught by the
|
||||
|
@ -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) {}
|
||||
|
@ -38,6 +38,6 @@ _M2_Builtins_init (void)
|
||||
|
||||
EXTERN
|
||||
void
|
||||
_M2_Builtins_finish (void)
|
||||
_M2_Builtins_fini (void)
|
||||
{
|
||||
}
|
||||
|
@ -122,6 +122,6 @@ _M2_RTco_init (void)
|
||||
|
||||
EXTERN
|
||||
void
|
||||
_M2_RTco_finish (void)
|
||||
_M2_RTco_fini (void)
|
||||
{
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
@ -270,6 +270,6 @@ _M2_Selective_init ()
|
||||
|
||||
EXTERN
|
||||
void
|
||||
_M2_Selective_finish ()
|
||||
_M2_Selective_fini ()
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ _M2_dtoa_init (void)
|
||||
}
|
||||
|
||||
void
|
||||
_M2_dtoa_finish (void)
|
||||
_M2_dtoa_fini (void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ _M2_ldtoa_init (void)
|
||||
}
|
||||
|
||||
void
|
||||
_M2_ldtoa_finish (void)
|
||||
_M2_ldtoa_fini (void)
|
||||
{
|
||||
}
|
||||
# ifdef __cplusplus
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ static void * currentSource;
|
||||
and message in the EHBlock for later use.
|
||||
*/
|
||||
|
||||
extern "C" void RTExceptions_Raise (unsigned int number, void * file, unsigned int line, unsigned int column, void * function, void * message);
|
||||
extern "C" void RTExceptions_Raise (unsigned int number, void * file, unsigned int line, unsigned int column, void * function, void * message) __attribute__ ((noreturn));
|
||||
|
||||
/*
|
||||
SetExceptionBlock - sets, source, as the active EHB.
|
||||
@ -239,7 +239,7 @@ static RTExceptions_Handler findHandler (RTExceptions_EHBlock e, unsigned int nu
|
||||
exception in the active EHB.
|
||||
*/
|
||||
|
||||
static void InvokeHandler (void);
|
||||
static void InvokeHandler (void) __attribute__ ((noreturn));
|
||||
|
||||
/*
|
||||
DoThrow - throw the exception number in the exception block.
|
||||
@ -485,6 +485,8 @@ static void InvokeHandler (void)
|
||||
else
|
||||
{
|
||||
(*h->p.proc) ();
|
||||
M2RTS_HALT (-1);
|
||||
__builtin_unreachable ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -719,7 +721,7 @@ static void AddHandler (RTExceptions_EHBlock e, RTExceptions_Handler h)
|
||||
|
||||
static void indexf (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 612, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
|
||||
}
|
||||
|
||||
|
||||
@ -729,7 +731,7 @@ static void indexf (void * a)
|
||||
|
||||
static void range (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 624, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
|
||||
}
|
||||
|
||||
|
||||
@ -739,7 +741,7 @@ static void range (void * a)
|
||||
|
||||
static void casef (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 636, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
|
||||
}
|
||||
|
||||
|
||||
@ -749,7 +751,7 @@ static void casef (void * a)
|
||||
|
||||
static void invalidloc (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 648, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
|
||||
}
|
||||
|
||||
|
||||
@ -759,7 +761,7 @@ static void invalidloc (void * a)
|
||||
|
||||
static void function (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 660, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
|
||||
}
|
||||
|
||||
|
||||
@ -769,7 +771,7 @@ static void function (void * a)
|
||||
|
||||
static void wholevalue (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 672, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -779,7 +781,7 @@ static void wholevalue (void * a)
|
||||
|
||||
static void wholediv (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 684, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -789,7 +791,7 @@ static void wholediv (void * a)
|
||||
|
||||
static void realvalue (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 696, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -799,7 +801,7 @@ static void realvalue (void * a)
|
||||
|
||||
static void realdiv (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 708, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -809,7 +811,7 @@ static void realdiv (void * a)
|
||||
|
||||
static void complexvalue (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 720, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -819,7 +821,7 @@ static void complexvalue (void * a)
|
||||
|
||||
static void complexdiv (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 732, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -829,7 +831,7 @@ static void complexdiv (void * a)
|
||||
|
||||
static void protection (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 744, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -839,7 +841,7 @@ static void protection (void * a)
|
||||
|
||||
static void systemf (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 756, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -849,7 +851,7 @@ static void systemf (void * a)
|
||||
|
||||
static void coroutine (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 768, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -859,7 +861,7 @@ static void coroutine (void * a)
|
||||
|
||||
static void exception (void * a)
|
||||
{
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 780, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
|
||||
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
|
||||
}
|
||||
|
||||
|
||||
@ -1178,7 +1180,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_GetBaseExceptionBlock (void)
|
||||
{
|
||||
if (currentEHB == NULL)
|
||||
{
|
||||
M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 598, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
|
||||
M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1215,7 +1217,7 @@ extern "C" void _M2_RTExceptions_init (__attribute__((unused)) int argc,__attrib
|
||||
Init ();
|
||||
}
|
||||
|
||||
extern "C" void _M2_RTExceptions_finish (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
|
||||
extern "C" void _M2_RTExceptions_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
|
||||
{
|
||||
TidyUp ();
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -41,6 +41,7 @@ extern "C" {
|
||||
# endif
|
||||
|
||||
# include "GSYSTEM.h"
|
||||
# include "GRTentity.h"
|
||||
|
||||
# if defined (_RTco_C)
|
||||
# define EXTERN
|
||||
|
67
gcc/m2/mc-boot/GRTentity.h
Normal file
67
gcc/m2/mc-boot/GRTentity.h
Normal file
@ -0,0 +1,67 @@
|
||||
/* do not edit automatically generated by mc from RTentity. */
|
||||
/* RTentity.def maintains a grouping of different opaque types.
|
||||
|
||||
Copyright (C) 2008-2023 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
Under Section 7 of GPL version 3, you are granted additional
|
||||
permissions described in the GCC Runtime Library Exception, version
|
||||
3.1, as published by the Free Software Foundation.
|
||||
|
||||
You should have received a copy of the GNU General Public License and
|
||||
a copy of the GCC Runtime Library Exception along with this program;
|
||||
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
#if !defined (_RTentity_H)
|
||||
# define _RTentity_H
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# if !defined (PROC_D)
|
||||
# define PROC_D
|
||||
typedef void (*PROC_t) (void);
|
||||
typedef struct { PROC_t proc; } PROC;
|
||||
# endif
|
||||
|
||||
# include "GSYSTEM.h"
|
||||
|
||||
# if defined (_RTentity_C)
|
||||
# define EXTERN
|
||||
# else
|
||||
# define EXTERN extern
|
||||
# endif
|
||||
|
||||
#if !defined (RTentity_Group_D)
|
||||
# define RTentity_Group_D
|
||||
typedef void *RTentity_Group;
|
||||
#endif
|
||||
|
||||
EXTERN RTentity_Group RTentity_InitGroup (void);
|
||||
EXTERN RTentity_Group RTentity_KillGroup (RTentity_Group g);
|
||||
EXTERN unsigned int RTentity_GetKey (RTentity_Group g, void * a);
|
||||
EXTERN void RTentity_PutKey (RTentity_Group g, void * a, unsigned int key);
|
||||
EXTERN void RTentity_DelKey (RTentity_Group g, void * a);
|
||||
EXTERN unsigned int RTentity_IsIn (RTentity_Group g, void * a);
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
# undef EXTERN
|
||||
#endif
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user