From 1ea6fef426e37a09edd97bca65733930c214978d Mon Sep 17 00:00:00 2001 From: Gaius Mulley <gaiusmod2@gmail.com> Date: Tue, 7 Jan 2025 11:20:45 +0000 Subject: [PATCH] [PR modula2/118010, modula2/118183] Unable to rebuild the bootstrap tools and Wtypemismatch This patch combines fixes for both PR-118010 (Wtypemismatch) and PR-118183 (unable to rebuild the bootstrap tools). PR-118010 required a new data type (COFF_T) to be exported from SYSTEM and used in all return types for libc.lseek. The patch also includes COFF_T implemented in mc and this data type has been propagated though the translated versions of pge and mc. Finally the patch adjusts the modula-2 declaration of location_t to reflect the new gcc 64 bit type. A new command line option -fm2-file-offset-bits= has been implemented to override the default 64 bit declaration of COFF_T. gcc/ChangeLog: PR modula2/118010 * doc/gm2.texi (Compiler options): New option -fm2-file-offset-bits=. gcc/m2/ChangeLog: PR modula2/118010 PR modula2/118183 * gm2-compiler/M2GCCDeclare.mod (Import): COffT, GetCOffTType. (DeclareDefaultSimpleTypes): Declare COFF_T. * gm2-compiler/M2GenGCC.mod (GetParamSize): Correct first parameter to BuildSize to use location rather than a token position. * gm2-compiler/M2Options.def (SetFileOffsetBits): New procedure. (GetFileOffsetBits): New procedure function. * gm2-compiler/M2Options.mod (SetFileOffsetBits): New procedure. (GetFileOffsetBits): New procedure function. (OffTBits): New variable. * gm2-compiler/M2System.def (COffT): New variable. * gm2-compiler/M2System.mod (MakeExtraSystemTypes): Declare COffT. * gm2-compiler/P1SymBuild.mod (EndBuildProcedure): Call PutProcedureDefined. * gm2-compiler/P2SymBuild.mod (Debug): Reimplement. * gm2-compiler/SymbolTable.mod (InitProcedureDeclaration): Initialize ProcedureTok. * gm2-gcc/gcctypes.def (location_t): Declare as CARDINAL64. * gm2-gcc/m2linemap.cc (m2linemap_GetLocationBinary): Add call to linemap_add indication a LC_LEAVE. * gm2-gcc/m2options.h (M2Options_SetFileOffsetBits): New procedure. (M2Options_GetFileOffsetBits): New procedure function. * gm2-gcc/m2type.cc (m2_offt_type_node): New variable. (m2type_GetCSizeTType): Reword comment. (m2type_GetCSSizeTType): Reword comment. (m2type_GetCOffTType): New function. (build_m2_offt_type_node): New function. (m2type_InitSystemTypes): Initialize m2_offt_type_node. * gm2-gcc/m2type.def (GetCSizeTType): Reword comment. (GetCOffTType): New procedure function. * gm2-gcc/m2type.h (m2type_GetCOffTType): New prototype. * gm2-lang.cc (gm2_langhook_handle_option): New clause OPT_fm2_file_offset_bits_. * gm2-libs-coroutines/SYSTEM.def: Add COFF_T to export list. * gm2-libs-iso/SYSTEM.def: Ditto. * gm2-libs-min/SYSTEM.def: Ditto. * gm2-libs/SYSTEM.def: Add COFF_T and CARDINAL64 to export list. * gm2-libs/libc.def (lseek): Change return type to COFF_T. * lang.opt (-fm2-file-offset-bits=): New option. * mc-boot-ch/Glibc.c (libc_lseek): Change result to use off_t. * mc-boot/GASCII.cc: Rebuilt. * mc-boot/GASCII.h: Ditto. * mc-boot/GArgs.cc: Ditto. * mc-boot/GArgs.h: Ditto. * mc-boot/GAssertion.cc: Ditto. * mc-boot/GAssertion.h: Ditto. * mc-boot/GBreak.cc: Ditto. * mc-boot/GBreak.h: Ditto. * mc-boot/GCOROUTINES.h: Ditto. * mc-boot/GCmdArgs.cc: Ditto. * mc-boot/GCmdArgs.h: Ditto. * mc-boot/GDebug.cc: Ditto. * mc-boot/GDebug.h: Ditto. * mc-boot/GDynamicStrings.cc: Ditto. * mc-boot/GDynamicStrings.h: Ditto. * mc-boot/GEnvironment.cc: Ditto. * mc-boot/GEnvironment.h: Ditto. * mc-boot/GFIO.cc: Ditto. * mc-boot/GFIO.h: Ditto. * mc-boot/GFormatStrings.cc: Ditto. * mc-boot/GFormatStrings.h: Ditto. * mc-boot/GFpuIO.cc: Ditto. * mc-boot/GFpuIO.h: Ditto. * mc-boot/GIO.cc: Ditto. * mc-boot/GIO.h: Ditto. * mc-boot/GIndexing.cc: Ditto. * mc-boot/GIndexing.h: Ditto. * mc-boot/GM2Dependent.cc: Ditto. * mc-boot/GM2Dependent.h: Ditto. * mc-boot/GM2EXCEPTION.cc: Ditto. * mc-boot/GM2EXCEPTION.h: Ditto. * mc-boot/GM2RTS.cc: Ditto. (M2RTS_Halt): Call libc_exit. (M2RTS_HaltC): Ditto. * mc-boot/GM2RTS.h: Rebuilt. * mc-boot/GMemUtils.cc: Ditto. * mc-boot/GMemUtils.h: Ditto. * mc-boot/GNumberIO.cc: Ditto. * mc-boot/GNumberIO.h: Ditto. * mc-boot/GPushBackInput.cc: Ditto. * mc-boot/GPushBackInput.h: Ditto. * mc-boot/GRTExceptions.cc: Ditto. * mc-boot/GRTExceptions.h: Ditto. * mc-boot/GRTco.h: Ditto. * mc-boot/GRTentity.h: Ditto. * mc-boot/GRTint.cc: Ditto. * mc-boot/GRTint.h: Ditto. * mc-boot/GSArgs.cc: Ditto. * mc-boot/GSArgs.h: Ditto. * mc-boot/GSFIO.cc: Ditto. * mc-boot/GSFIO.h: Ditto. * mc-boot/GSYSTEM.h: Ditto. * mc-boot/GSelective.h: Ditto. * mc-boot/GStdIO.cc: Ditto. * mc-boot/GStdIO.h: Ditto. * mc-boot/GStorage.cc: Ditto. * mc-boot/GStorage.h: Ditto. * mc-boot/GStrCase.cc: Ditto. * mc-boot/GStrCase.h: Ditto. * mc-boot/GStrIO.cc: Ditto. * mc-boot/GStrIO.h: Ditto. * mc-boot/GStrLib.cc: Ditto. * mc-boot/GStrLib.h: Ditto. * mc-boot/GStringConvert.cc: Ditto. * mc-boot/GStringConvert.h: Ditto. * mc-boot/GSysExceptions.h: Ditto. * mc-boot/GSysStorage.cc: Ditto. * mc-boot/GSysStorage.h: Ditto. * mc-boot/GTimeString.cc: Ditto. * mc-boot/GTimeString.h: Ditto. * mc-boot/GUnixArgs.h: Ditto. * mc-boot/Galists.cc: Ditto. * mc-boot/Galists.h: Ditto. * mc-boot/Gdecl.cc: Ditto. * mc-boot/Gdecl.h: Rebuilt. * mc-boot/Gdtoa.h: Ditto. * mc-boot/Gerrno.h: Ditto. * mc-boot/Gkeyc.cc: Ditto. * mc-boot/Gkeyc.h: Rebuilt. * mc-boot/Gldtoa.h: Ditto. * mc-boot/Glibc.h: Ditto. * mc-boot/Glibm.h: Ditto. * mc-boot/Glists.cc: Ditto. * mc-boot/Glists.h: Ditto. * mc-boot/GmcComment.cc: Ditto. * mc-boot/GmcComment.h: Ditto. * mc-boot/GmcComp.cc: Ditto. * mc-boot/GmcComp.h: Ditto. * mc-boot/GmcDebug.cc: Ditto. * mc-boot/GmcDebug.h: Ditto. * mc-boot/GmcError.cc: Ditto. * mc-boot/GmcError.h: Ditto. * mc-boot/GmcFileName.cc: Ditto. * mc-boot/GmcFileName.h: Ditto. * mc-boot/GmcLexBuf.cc: Ditto. * mc-boot/GmcLexBuf.h: Ditto. * mc-boot/GmcMetaError.cc: Ditto. * mc-boot/GmcMetaError.h: Ditto. * mc-boot/GmcOptions.cc: Ditto. * mc-boot/GmcOptions.h: Ditto. * mc-boot/GmcPreprocess.cc: Ditto. * mc-boot/GmcPreprocess.h: Ditto. * mc-boot/GmcPretty.cc: Ditto. * mc-boot/GmcPretty.h: Ditto. * mc-boot/GmcPrintf.cc: Ditto. * mc-boot/GmcPrintf.h: Ditto. * mc-boot/GmcQuiet.cc: Ditto. * mc-boot/GmcQuiet.h: Ditto. * mc-boot/GmcReserved.cc: Ditto. * mc-boot/GmcReserved.h: Ditto. * mc-boot/GmcSearch.cc: Ditto. * mc-boot/GmcSearch.h: Ditto. * mc-boot/GmcStack.cc: Ditto. * mc-boot/GmcStack.h: Ditto. * mc-boot/GmcStream.cc: Ditto. * mc-boot/GmcStream.h: Ditto. * mc-boot/Gmcflex.h: Ditto. * mc-boot/Gmcp1.cc: Ditto. * mc-boot/Gmcp1.h: Ditto. * mc-boot/Gmcp2.cc: Ditto. * mc-boot/Gmcp2.h: Ditto. * mc-boot/Gmcp3.cc: Ditto. * mc-boot/Gmcp3.h: Ditto. * mc-boot/Gmcp4.cc: Ditto. * mc-boot/Gmcp4.h: Ditto. * mc-boot/Gmcp5.cc: Ditto. * mc-boot/Gmcp5.h: Ditto. * mc-boot/GnameKey.cc: Ditto. * mc-boot/GnameKey.h: Ditto. * mc-boot/GsymbolKey.cc: Ditto. * mc-boot/GsymbolKey.h: Ditto. * mc-boot/Gtermios.h: Ditto. * mc-boot/Gtop.cc: Ditto. * mc-boot/Gvarargs.cc: Ditto. * mc-boot/Gvarargs.h: Ditto. * mc-boot/Gwlists.cc: Ditto. * mc-boot/Gwlists.h: Ditto. * mc-boot/Gwrapc.h: Ditto. * mc/decl.mod (cofft): New enum. (cardinal64): Ditto. (cofftN): New variable. (cardinal64N): Ditto. (isProcedure): Remove. (getSymName): Add clause for cofft and cardinal64. (makeBase): Ditto. (isOrdinal): Ditto. (getType): Ditto. (doGetExprType): Ditto. (getScope): Ditto. (doExprC): Ditto. (isSystem): Ditto. (doSystemC): Ditto. (doDependants): Ditto. (visitDependants): Ditto. (genKind): Ditto. (doSystemM2): Ditto. (doDupExpr): Ditto. (makeSystem): Initialize cofftN and cardinal64N. * mc/keyc.mod (useUIntMin): Remove. (useUIntMax): Ditto. * pge-boot/GIndexing.h: Rebuilt. * pge-boot/GSEnvironment.h: Ditto. * pge-boot/GScan.h: Ditto. * pge-boot/Glibc.h: Ditto. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com> --- gcc/doc/gm2.texi | 4 ++ gcc/m2/gm2-compiler/M2GCCDeclare.mod | 5 +- gcc/m2/gm2-compiler/M2GenGCC.mod | 2 +- gcc/m2/gm2-compiler/M2Options.def | 14 +++++ gcc/m2/gm2-compiler/M2Options.mod | 28 ++++++++- gcc/m2/gm2-compiler/M2System.def | 2 + gcc/m2/gm2-compiler/M2System.mod | 6 +- gcc/m2/gm2-compiler/P1SymBuild.mod | 3 +- gcc/m2/gm2-compiler/P2SymBuild.mod | 7 ++- gcc/m2/gm2-compiler/SymbolTable.mod | 3 +- gcc/m2/gm2-gcc/gcctypes.def | 4 +- gcc/m2/gm2-gcc/m2linemap.cc | 1 + gcc/m2/gm2-gcc/m2options.h | 2 + gcc/m2/gm2-gcc/m2type.cc | 23 +++++++- gcc/m2/gm2-gcc/m2type.def | 11 +++- gcc/m2/gm2-gcc/m2type.h | 2 +- gcc/m2/gm2-lang.cc | 10 ++++ gcc/m2/gm2-libs-coroutines/SYSTEM.def | 2 +- gcc/m2/gm2-libs-iso/SYSTEM.def | 2 +- gcc/m2/gm2-libs-min/SYSTEM.def | 2 +- gcc/m2/gm2-libs/SYSTEM.def | 2 +- gcc/m2/gm2-libs/libc.def | 4 +- gcc/m2/lang.opt | 4 ++ gcc/m2/mc-boot-ch/Glibc.c | 2 +- gcc/m2/mc-boot/GASCII.cc | 1 + gcc/m2/mc-boot/GASCII.h | 1 + gcc/m2/mc-boot/GArgs.cc | 1 + gcc/m2/mc-boot/GArgs.h | 1 + gcc/m2/mc-boot/GAssertion.cc | 1 + gcc/m2/mc-boot/GAssertion.h | 1 + gcc/m2/mc-boot/GBreak.cc | 1 + gcc/m2/mc-boot/GBreak.h | 1 + gcc/m2/mc-boot/GCOROUTINES.h | 1 + gcc/m2/mc-boot/GCmdArgs.cc | 1 + gcc/m2/mc-boot/GCmdArgs.h | 1 + gcc/m2/mc-boot/GDebug.cc | 1 + gcc/m2/mc-boot/GDebug.h | 1 + gcc/m2/mc-boot/GDynamicStrings.cc | 1 + gcc/m2/mc-boot/GDynamicStrings.h | 1 + gcc/m2/mc-boot/GEnvironment.cc | 1 + gcc/m2/mc-boot/GEnvironment.h | 1 + gcc/m2/mc-boot/GFIO.cc | 1 + gcc/m2/mc-boot/GFIO.h | 1 + gcc/m2/mc-boot/GFormatStrings.cc | 1 + gcc/m2/mc-boot/GFormatStrings.h | 1 + gcc/m2/mc-boot/GFpuIO.cc | 1 + gcc/m2/mc-boot/GFpuIO.h | 1 + gcc/m2/mc-boot/GIO.cc | 1 + gcc/m2/mc-boot/GIO.h | 1 + gcc/m2/mc-boot/GIndexing.cc | 1 + gcc/m2/mc-boot/GIndexing.h | 1 + gcc/m2/mc-boot/GM2Dependent.cc | 1 + gcc/m2/mc-boot/GM2Dependent.h | 1 + gcc/m2/mc-boot/GM2EXCEPTION.cc | 1 + gcc/m2/mc-boot/GM2EXCEPTION.h | 1 + gcc/m2/mc-boot/GM2RTS.cc | 3 + gcc/m2/mc-boot/GM2RTS.h | 1 + gcc/m2/mc-boot/GMemUtils.cc | 1 + gcc/m2/mc-boot/GMemUtils.h | 1 + gcc/m2/mc-boot/GNumberIO.cc | 1 + gcc/m2/mc-boot/GNumberIO.h | 1 + gcc/m2/mc-boot/GPushBackInput.cc | 1 + gcc/m2/mc-boot/GPushBackInput.h | 1 + gcc/m2/mc-boot/GRTExceptions.cc | 1 + gcc/m2/mc-boot/GRTExceptions.h | 1 + gcc/m2/mc-boot/GRTco.h | 1 + gcc/m2/mc-boot/GRTentity.h | 1 + gcc/m2/mc-boot/GRTint.cc | 1 + gcc/m2/mc-boot/GRTint.h | 1 + gcc/m2/mc-boot/GSArgs.cc | 1 + gcc/m2/mc-boot/GSArgs.h | 1 + gcc/m2/mc-boot/GSFIO.cc | 1 + gcc/m2/mc-boot/GSFIO.h | 1 + gcc/m2/mc-boot/GSYSTEM.h | 1 + gcc/m2/mc-boot/GSelective.h | 1 + gcc/m2/mc-boot/GStdIO.cc | 1 + gcc/m2/mc-boot/GStdIO.h | 1 + gcc/m2/mc-boot/GStorage.cc | 1 + gcc/m2/mc-boot/GStorage.h | 1 + gcc/m2/mc-boot/GStrCase.cc | 1 + gcc/m2/mc-boot/GStrCase.h | 1 + gcc/m2/mc-boot/GStrIO.cc | 1 + gcc/m2/mc-boot/GStrIO.h | 1 + gcc/m2/mc-boot/GStrLib.cc | 1 + gcc/m2/mc-boot/GStrLib.h | 1 + gcc/m2/mc-boot/GStringConvert.cc | 1 + gcc/m2/mc-boot/GStringConvert.h | 1 + gcc/m2/mc-boot/GSysExceptions.h | 1 + gcc/m2/mc-boot/GSysStorage.cc | 1 + gcc/m2/mc-boot/GSysStorage.h | 1 + gcc/m2/mc-boot/GTimeString.cc | 1 + gcc/m2/mc-boot/GTimeString.h | 1 + gcc/m2/mc-boot/GUnixArgs.h | 1 + gcc/m2/mc-boot/Galists.cc | 1 + gcc/m2/mc-boot/Galists.h | 1 + gcc/m2/mc-boot/Gdecl.cc | 84 +++++++++++++++++++++------ gcc/m2/mc-boot/Gdecl.h | 1 + gcc/m2/mc-boot/Gdtoa.h | 1 + gcc/m2/mc-boot/Gerrno.h | 1 + gcc/m2/mc-boot/Gkeyc.cc | 2 + gcc/m2/mc-boot/Gkeyc.h | 1 + gcc/m2/mc-boot/Gldtoa.h | 1 + gcc/m2/mc-boot/Glibc.h | 1 + gcc/m2/mc-boot/Glibm.h | 1 + gcc/m2/mc-boot/Glists.cc | 1 + gcc/m2/mc-boot/Glists.h | 1 + gcc/m2/mc-boot/GmcComment.cc | 1 + gcc/m2/mc-boot/GmcComment.h | 1 + gcc/m2/mc-boot/GmcComp.cc | 1 + gcc/m2/mc-boot/GmcComp.h | 1 + gcc/m2/mc-boot/GmcDebug.cc | 1 + gcc/m2/mc-boot/GmcDebug.h | 1 + gcc/m2/mc-boot/GmcError.cc | 1 + gcc/m2/mc-boot/GmcError.h | 1 + gcc/m2/mc-boot/GmcFileName.cc | 1 + gcc/m2/mc-boot/GmcFileName.h | 1 + gcc/m2/mc-boot/GmcLexBuf.cc | 1 + gcc/m2/mc-boot/GmcLexBuf.h | 1 + gcc/m2/mc-boot/GmcMetaError.cc | 1 + gcc/m2/mc-boot/GmcMetaError.h | 1 + gcc/m2/mc-boot/GmcOptions.cc | 1 + gcc/m2/mc-boot/GmcOptions.h | 1 + gcc/m2/mc-boot/GmcPreprocess.cc | 1 + gcc/m2/mc-boot/GmcPreprocess.h | 1 + gcc/m2/mc-boot/GmcPretty.cc | 1 + gcc/m2/mc-boot/GmcPretty.h | 1 + gcc/m2/mc-boot/GmcPrintf.cc | 1 + gcc/m2/mc-boot/GmcPrintf.h | 1 + gcc/m2/mc-boot/GmcQuiet.cc | 1 + gcc/m2/mc-boot/GmcQuiet.h | 1 + gcc/m2/mc-boot/GmcReserved.cc | 1 + gcc/m2/mc-boot/GmcReserved.h | 1 + gcc/m2/mc-boot/GmcSearch.cc | 1 + gcc/m2/mc-boot/GmcSearch.h | 1 + gcc/m2/mc-boot/GmcStack.cc | 1 + gcc/m2/mc-boot/GmcStack.h | 1 + gcc/m2/mc-boot/GmcStream.cc | 1 + gcc/m2/mc-boot/GmcStream.h | 1 + gcc/m2/mc-boot/Gmcflex.h | 1 + gcc/m2/mc-boot/Gmcp1.cc | 1 + gcc/m2/mc-boot/Gmcp1.h | 1 + gcc/m2/mc-boot/Gmcp2.cc | 1 + gcc/m2/mc-boot/Gmcp2.h | 1 + gcc/m2/mc-boot/Gmcp3.cc | 1 + gcc/m2/mc-boot/Gmcp3.h | 1 + gcc/m2/mc-boot/Gmcp4.cc | 1 + gcc/m2/mc-boot/Gmcp4.h | 1 + gcc/m2/mc-boot/Gmcp5.cc | 1 + gcc/m2/mc-boot/Gmcp5.h | 1 + gcc/m2/mc-boot/GnameKey.cc | 1 + gcc/m2/mc-boot/GnameKey.h | 1 + gcc/m2/mc-boot/GsymbolKey.cc | 1 + gcc/m2/mc-boot/GsymbolKey.h | 1 + gcc/m2/mc-boot/Gtermios.h | 1 + gcc/m2/mc-boot/Gtop.cc | 1 + gcc/m2/mc-boot/Gvarargs.cc | 1 + gcc/m2/mc-boot/Gvarargs.h | 1 + gcc/m2/mc-boot/Gwlists.cc | 1 + gcc/m2/mc-boot/Gwlists.h | 1 + gcc/m2/mc-boot/Gwrapc.h | 1 + gcc/m2/mc/decl.mod | 83 +++++++++++++++++--------- gcc/m2/mc/keyc.mod | 20 ------- gcc/m2/pge-boot/GIndexing.h | 1 + gcc/m2/pge-boot/GSEnvironment.h | 1 + gcc/m2/pge-boot/GScan.h | 1 + gcc/m2/pge-boot/Glibc.h | 2 +- 166 files changed, 383 insertions(+), 92 deletions(-) diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi index 9e620c32ae1a..0bace308d112 100644 --- a/gcc/doc/gm2.texi +++ b/gcc/doc/gm2.texi @@ -500,6 +500,10 @@ the previous forms could be: @code{-fm2-dump-filter=m2pim.StrIO.WriteString} and @code{-fm2-dump-filter=StrLib.mod:StrIO.WriteString}. +@item -fm2-file-offset-bits= +force the type @code{SYSTEM.COFF_T} to be built using the specified +number of bits. If this option is not used then default is 64 bits. + @item -fm2-g improve the debugging experience for new programmers at the expense of generating @code{nop} instructions if necessary to ensure single diff --git a/gcc/m2/gm2-compiler/M2GCCDeclare.mod b/gcc/m2/gm2-compiler/M2GCCDeclare.mod index d536ee31452f..0de9ff7f2214 100644 --- a/gcc/m2/gm2-compiler/M2GCCDeclare.mod +++ b/gcc/m2/gm2-compiler/M2GCCDeclare.mod @@ -147,7 +147,7 @@ FROM M2Base IMPORT IsPseudoBaseProcedure, IsPseudoBaseFunction, FROM M2System IMPORT IsPseudoSystemFunction, IsSystemType, GetSystemTypeMinMax, Address, Word, Byte, Loc, System, IntegerN, CardinalN, WordN, RealN, SetN, ComplexN, - CSizeT, CSSizeT ; + CSizeT, CSSizeT, COffT ; FROM M2Bitset IMPORT Bitset, Bitnum ; FROM SymbolConversion IMPORT AddModGcc, Mod2Gcc, GccKnowsAbout, Poison, RemoveMod2Gcc ; @@ -185,7 +185,7 @@ FROM m2type IMPORT MarkFunctionReferenced, BuildStartRecord, BuildStartVarient, GetM2Cardinal16, GetM2Cardinal32, GetM2Cardinal64, GetM2Word16, GetM2Word32, GetM2Word64, GetM2Bitset8, GetM2Bitset16, GetM2Bitset32, GetM2Real32, GetM2Real64, GetM2Real96, GetM2Real128, GetM2Complex32, GetM2Complex64, GetM2Complex96, - GetM2Complex128, GetCSizeTType, GetCSSizeTType, + GetM2Complex128, GetCSizeTType, GetCSSizeTType, GetCOffTType, GetPackedBooleanType, BuildConstPointerType, BuildPointerType, BuildEnumerator, BuildStartEnumeration, BuildEndEnumeration, SetAlignment, SetTypePacked, SetDeclPacked, BuildSmallestTypeRange, @@ -3229,6 +3229,7 @@ BEGIN DeclareDefaultType(ShortComplex, "SHORTCOMPLEX", GetM2ShortComplexType()) ; DeclareDefaultType(CSizeT , "CSIZE_T" , GetCSizeTType()) ; DeclareDefaultType(CSSizeT , "CSSIZE_T" , GetCSSizeTType()) ; + DeclareDefaultType(COffT , "COFF_T" , GetCOffTType()) ; DeclareBoolean ; diff --git a/gcc/m2/gm2-compiler/M2GenGCC.mod b/gcc/m2/gm2-compiler/M2GenGCC.mod index 01ceeb61d60b..7ddcc1622900 100644 --- a/gcc/m2/gm2-compiler/M2GenGCC.mod +++ b/gcc/m2/gm2-compiler/M2GenGCC.mod @@ -1660,7 +1660,7 @@ BEGIN THEN RETURN GetSizeOfHighFromUnbounded(tokenno, param) ELSE - RETURN BuildSize(tokenno, Mod2Gcc(GetType(param)), FALSE) + RETURN BuildSize (TokenToLocation (tokenno), Mod2Gcc (GetType (param)), FALSE) END END GetParamSize ; diff --git a/gcc/m2/gm2-compiler/M2Options.def b/gcc/m2/gm2-compiler/M2Options.def index 1d14868a353c..2b78add36cd3 100644 --- a/gcc/m2/gm2-compiler/M2Options.def +++ b/gcc/m2/gm2-compiler/M2Options.def @@ -1135,6 +1135,20 @@ PROCEDURE GetEnableForward () : BOOLEAN ; PROCEDURE SetEnableForward (value: BOOLEAN) ; +(* + SetFileOffsetBits - set the number of bits used by SYSTEM.COFF_T to bits. +*) + +PROCEDURE SetFileOffsetBits (value: BOOLEAN; bits: CARDINAL) : BOOLEAN ; + + +(* + GetFileOffsetBits - return the number of bits used by SYSTEM.COFF_T. +*) + +PROCEDURE GetFileOffsetBits () : CARDINAL ; + + (* FinaliseOptions - once all options have been parsed we set any inferred values. diff --git a/gcc/m2/gm2-compiler/M2Options.mod b/gcc/m2/gm2-compiler/M2Options.mod index 9a0cf784c9ae..4c03dfeddfba 100644 --- a/gcc/m2/gm2-compiler/M2Options.mod +++ b/gcc/m2/gm2-compiler/M2Options.mod @@ -95,6 +95,7 @@ VAR UselistFlag, CC1Quiet, SeenSources : BOOLEAN ; + OffTBits : CARDINAL ; ForcedLocationValue : location_t ; @@ -2029,6 +2030,30 @@ BEGIN END SetEnableForward ; +(* + SetFileOffsetBits - create SYSTEM.COFF_T as a signed integer of size bits. +*) + +PROCEDURE SetFileOffsetBits (value: BOOLEAN; bits: CARDINAL) : BOOLEAN ; +BEGIN + IF value + THEN + OffTBits := bits + END ; + RETURN TRUE +END SetFileOffsetBits ; + + +(* + GetFileOffsetBits - return the number of bits used to create SYSTEM.COFF_T. +*) + +PROCEDURE GetFileOffsetBits () : CARDINAL ; +BEGIN + RETURN OffTBits +END GetFileOffsetBits ; + + BEGIN cflag := FALSE ; (* -c. *) RuntimeModuleOverride := InitString (DefaultRuntimeModuleOverride) ; @@ -2121,5 +2146,6 @@ BEGIN DumpGimple := FALSE ; M2Dump := NIL ; M2DumpFilter := NIL ; - EnableForward := TRUE + EnableForward := TRUE ; + OffTBits := 64 ; (* Default to 64bit OFF_T. *) END M2Options. diff --git a/gcc/m2/gm2-compiler/M2System.def b/gcc/m2/gm2-compiler/M2System.def index 11b4fdef0bbd..9c91b04e4a82 100644 --- a/gcc/m2/gm2-compiler/M2System.def +++ b/gcc/m2/gm2-compiler/M2System.def @@ -42,6 +42,7 @@ EXPORT QUALIFIED Address, (* System Type *) CSizeT, (* System Type *) CSSizeT, (* System Type *) + COffT, (* System Type *) Adr, (* System Function *) TSize, (* System Function *) @@ -75,6 +76,7 @@ VAR Word, Byte, Address, CSizeT, CSSizeT, + COffT, Adr, TSize, TBitSize, diff --git a/gcc/m2/gm2-compiler/M2System.mod b/gcc/m2/gm2-compiler/M2System.mod index a1a9f918ebc1..efd5d1183a3f 100644 --- a/gcc/m2/gm2-compiler/M2System.mod +++ b/gcc/m2/gm2-compiler/M2System.mod @@ -86,7 +86,8 @@ FROM m2type IMPORT GetMaxFrom, GetMinFrom, GetM2Real32, GetM2Real64, GetM2Real96, GetM2Real128, GetM2Complex32, GetM2Complex64, GetM2Complex96, GetM2Complex128, GetBitsetType, GetISOByteType, GetISOWordType, - GetCSizeTType, GetCSSizeTType, InitSystemTypes ; + GetCSizeTType, GetCSSizeTType, GetCOffTType, + InitSystemTypes ; FROM m2expr IMPORT BuildSize, GetSizeOf, AreConstantsEqual ; @@ -327,7 +328,8 @@ END InitISOTypes ; PROCEDURE MakeExtraSystemTypes ; BEGIN CSizeT := CreateType ('CSIZE_T' , '', '', TRUE, GetCSizeTType ()) ; - CSSizeT := CreateType ('CSSIZE_T', '', '', TRUE, GetCSSizeTType ()) + CSSizeT := CreateType ('CSSIZE_T', '', '', TRUE, GetCSSizeTType ()) ; + COffT := CreateType ('COFF_T', '', '', TRUE, GetCOffTType ()) ; END MakeExtraSystemTypes ; diff --git a/gcc/m2/gm2-compiler/P1SymBuild.mod b/gcc/m2/gm2-compiler/P1SymBuild.mod index e9fda9f4d980..02d4ac7f7514 100644 --- a/gcc/m2/gm2-compiler/P1SymBuild.mod +++ b/gcc/m2/gm2-compiler/P1SymBuild.mod @@ -1042,7 +1042,8 @@ BEGIN 'first proper declaration of procedure {%1Ea}', ProcSym) ; MetaErrorT1 (tok, 'procedure {%1Ea} has already been declared', ProcSym) ELSE - PutProcedureDeclaredTok (ProcSym, ProperProcedure, tok) + PutProcedureDeclaredTok (ProcSym, ProperProcedure, tok) ; + PutProcedureDefined (ProcSym, ProperProcedure) END ; Assert (NOT CompilingDefinitionModule()) ; LeaveBlock diff --git a/gcc/m2/gm2-compiler/P2SymBuild.mod b/gcc/m2/gm2-compiler/P2SymBuild.mod index 0bce78fc0d4f..a625e7dd95d7 100644 --- a/gcc/m2/gm2-compiler/P2SymBuild.mod +++ b/gcc/m2/gm2-compiler/P2SymBuild.mod @@ -182,12 +182,13 @@ PROCEDURE stop ; BEGIN END stop ; Debug - call stop if symbol name is name. *) -PROCEDURE Debug (sym: CARDINAL; name: ARRAY OF CHAR) ; +PROCEDURE Debug (tok: CARDINAL; sym: CARDINAL; name: ARRAY OF CHAR) ; BEGIN IF MakeKey (name) = GetSymName (sym) THEN stop - END + END ; + MetaErrorT1 (tok, 'procedure {%1Wa}', sym) END Debug ; @@ -1503,7 +1504,7 @@ BEGIN PopT (ParamTotal) ; ProcSym := CARDINAL (OperandT (3 + CARDINAL (OperandT (3)) + 2)) ; tok := CARDINAL (OperandTok (3 + CARDINAL (OperandT (3)) + 2)) ; - Debug (ProcSym, 'foo') ; + (* Debug (tok, ProcSym, 'foo') ; *) curkind := GetProcedureKind (ProcSym, tok) ; PushT (ParamTotal) ; Annotate ("%1d||running total of no. of parameters") ; diff --git a/gcc/m2/gm2-compiler/SymbolTable.mod b/gcc/m2/gm2-compiler/SymbolTable.mod index 3d6584d38c9a..826d2d39de10 100644 --- a/gcc/m2/gm2-compiler/SymbolTable.mod +++ b/gcc/m2/gm2-compiler/SymbolTable.mod @@ -3940,7 +3940,8 @@ BEGIN HasVarArgs := FALSE ; (* Does the procedure use ... ? *) HasOptArg := FALSE ; (* Does this procedure use [ ] ? *) IsNoReturn := FALSE ; (* Declared attribute noreturn ? *) - ReturnOptional := FALSE (* Is the return value optional? *) + ReturnOptional := FALSE ; (* Is the return value optional? *) + ProcedureTok := UnknownTokenNo END END InitProcedureDeclaration ; diff --git a/gcc/m2/gm2-gcc/gcctypes.def b/gcc/m2/gm2-gcc/gcctypes.def index 097a40ae68f7..f30a269ef16d 100644 --- a/gcc/m2/gm2-gcc/gcctypes.def +++ b/gcc/m2/gm2-gcc/gcctypes.def @@ -21,7 +21,7 @@ along with GNU Modula-2; see the file COPYING3. If not see DEFINITION MODULE gcctypes ; -FROM SYSTEM IMPORT ADDRESS ; +FROM SYSTEM IMPORT ADDRESS, CARDINAL64 ; EXPORT UNQUALIFIED location_t, tree ; @@ -29,7 +29,7 @@ EXPORT UNQUALIFIED location_t, tree ; TYPE (* Not declared here by the bootstrap tool mc when --gcc-config-system is used. *) - location_t = CARDINAL ; + location_t = CARDINAL64 ; tree = ADDRESS ; diff --git a/gcc/m2/gm2-gcc/m2linemap.cc b/gcc/m2/gm2-gcc/m2linemap.cc index 338d691e8e28..feb62b3ed4d8 100644 --- a/gcc/m2/gm2-gcc/m2linemap.cc +++ b/gcc/m2/gm2-gcc/m2linemap.cc @@ -126,6 +126,7 @@ m2linemap_GetLocationBinary (location_t caret, location_t start, location_t fini linemap_add (line_table, LC_ENTER, false, xstrdup (m2linemap_GetFilenameFromLocation (start)), 1); gcc_assert (inFile); location_t location = make_location (caret, start, finish); + linemap_add (line_table, LC_LEAVE, false, NULL, 0); return location; } return caret; diff --git a/gcc/m2/gm2-gcc/m2options.h b/gcc/m2/gm2-gcc/m2options.h index ab1a2281e667..d60b510de34f 100644 --- a/gcc/m2/gm2-gcc/m2options.h +++ b/gcc/m2/gm2-gcc/m2options.h @@ -99,6 +99,8 @@ EXTERN void M2Options_SetSwig (bool value); EXTERN void M2Options_SetForcedLocation (location_t location); EXTERN location_t M2Options_OverrideLocation (location_t location); EXTERN void M2Options_SetStatistics (bool on); +EXTERN bool M2Options_SetFileOffsetBits (bool value, unsigned int bits); +EXTERN unsigned int M2Options_GetFileOffsetBits (void); EXTERN void M2Options_CppProg (const char *program); EXTERN void M2Options_CppArg (const char *opt, const char *arg, bool joined); EXTERN void M2Options_SetWholeProgram (bool value); diff --git a/gcc/m2/gm2-gcc/m2type.cc b/gcc/m2/gm2-gcc/m2type.cc index 1a489274e4a2..9f7a433e9806 100644 --- a/gcc/m2/gm2-gcc/m2type.cc +++ b/gcc/m2/gm2-gcc/m2type.cc @@ -119,6 +119,7 @@ static GTY (()) tree m2_complex96_type_node; static GTY (()) tree m2_complex128_type_node; static GTY (()) tree m2_packed_boolean_type_node; static GTY (()) tree m2_cardinal_address_type_node; +static GTY (()) tree m2_offt_type_node; /* gm2_canonicalize_array - returns a unique array node based on index_type and type. */ @@ -824,7 +825,7 @@ m2type_GetIntegerType (void) return integer_type_node; } -/* GetCSizeTType return a type representing, size_t on this system. */ +/* GetCSizeTType return a type representing size_t. */ tree m2type_GetCSizeTType (void) @@ -832,8 +833,7 @@ m2type_GetCSizeTType (void) return sizetype; } -/* GetCSSizeTType return a type representing, size_t on this - system. */ +/* GetCSSizeTType return a type representing size_t. */ tree m2type_GetCSSizeTType (void) @@ -841,6 +841,14 @@ m2type_GetCSSizeTType (void) return ssizetype; } +/* GetCSSizeTType return a type representing off_t. */ + +tree +m2type_GetCOffTType (void) +{ + return m2_offt_type_node; +} + /* GetPackedBooleanType return the packed boolean data type node. */ tree @@ -1373,6 +1381,14 @@ build_m2_iso_byte_node (location_t location, int loc) return c; } +static tree +build_m2_offt_type_node (location_t location) +{ + m2assert_AssertLocation (location); + return build_m2_specific_size_type (location, INTEGER_TYPE, + M2Options_GetFileOffsetBits (), true); +} + /* m2type_InitSystemTypes initialise loc and word derivatives. */ void @@ -1386,6 +1402,7 @@ m2type_InitSystemTypes (location_t location, int loc) m2_word16_type_node = build_m2_word16_type_node (location, loc); m2_word32_type_node = build_m2_word32_type_node (location, loc); m2_word64_type_node = build_m2_word64_type_node (location, loc); + m2_offt_type_node = build_m2_offt_type_node (location); } static tree diff --git a/gcc/m2/gm2-gcc/m2type.def b/gcc/m2/gm2-gcc/m2type.def index eea623ccf9c4..797335e00704 100644 --- a/gcc/m2/gm2-gcc/m2type.def +++ b/gcc/m2/gm2-gcc/m2type.def @@ -766,19 +766,26 @@ PROCEDURE GetM2CharType () : tree ; (* - GetCSizeTType - return a type representing, size_t on this system. + GetCSizeTType - return a type representing size_t. *) PROCEDURE GetCSizeTType () : tree ; (* - GetCSSizeTType - return a type representing, ssize_t on this system. + GetCSSizeTType - return a type representing ssize_t. *) PROCEDURE GetCSSizeTType () : tree ; +(* + GetCOffTType - return a type representing OFF_T. +*) + +PROCEDURE GetCOffTType () : tree ; + + (* BuildArrayStringConstructor - creates an array constructor for, arrayType, consisting of the character elements diff --git a/gcc/m2/gm2-gcc/m2type.h b/gcc/m2/gm2-gcc/m2type.h index f1da0f699383..04370d63e2bd 100644 --- a/gcc/m2/gm2-gcc/m2type.h +++ b/gcc/m2/gm2-gcc/m2type.h @@ -130,7 +130,7 @@ EXTERN tree m2type_GetShortCardType (void); EXTERN tree m2type_GetProcType (void); EXTERN tree m2type_GetCSizeTType (void); EXTERN tree m2type_GetCSSizeTType (void); - +EXTERN tree m2type_GetCOffTType (void); EXTERN tree m2type_GetM2CType (void); EXTERN tree m2type_GetBitsetType (void); diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc index 0ee0e54336a6..e8820daf4745 100644 --- a/gcc/m2/gm2-lang.cc +++ b/gcc/m2/gm2-lang.cc @@ -512,6 +512,16 @@ gm2_langhook_handle_option ( return M2Options_SetUninitVariableChecking (value, "known"); case OPT_Wuninit_variable_checking_: return M2Options_SetUninitVariableChecking (value, arg); + case OPT_fm2_file_offset_bits_: + { + if (arg != NULL) + { + unsigned int bits = atoi (arg); + if (bits > 0) + return M2Options_SetFileOffsetBits (value, bits); + } + return 0; + } case OPT_fm2_strict_type: M2Options_SetStrictTypeChecking (value); return 1; diff --git a/gcc/m2/gm2-libs-coroutines/SYSTEM.def b/gcc/m2/gm2-libs-coroutines/SYSTEM.def index a186f8b4a323..ea982e8ffa71 100644 --- a/gcc/m2/gm2-libs-coroutines/SYSTEM.def +++ b/gcc/m2/gm2-libs-coroutines/SYSTEM.def @@ -34,7 +34,7 @@ DEFINITION MODULE SYSTEM ; FROM COROUTINES IMPORT PROTECTION ; EXPORT QUALIFIED (* the following are built into the compiler: *) - ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *) + ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, COFF_T, (* @SYSTEM_DATATYPES@ *) ADR, TSIZE, ROTATE, SHIFT, THROW, TBITSIZE, (* SIZE is exported depending upon -fpim2 and -fpedantic. *) diff --git a/gcc/m2/gm2-libs-iso/SYSTEM.def b/gcc/m2/gm2-libs-iso/SYSTEM.def index f25fc6ff3a29..b99b2afdccce 100644 --- a/gcc/m2/gm2-libs-iso/SYSTEM.def +++ b/gcc/m2/gm2-libs-iso/SYSTEM.def @@ -17,7 +17,7 @@ DEFINITION MODULE SYSTEM; (* The constants and types define underlying properties of storage *) EXPORT QUALIFIED BITSPERLOC, LOCSPERWORD, - LOC, BYTE, WORD, ADDRESS, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *) + LOC, BYTE, WORD, ADDRESS, CSIZE_T, CSSIZE_T, COFF_T, (* @SYSTEM_DATATYPES@ *) ADDADR, SUBADR, DIFADR, MAKEADR, ADR, ROTATE, SHIFT, CAST, TSIZE, diff --git a/gcc/m2/gm2-libs-min/SYSTEM.def b/gcc/m2/gm2-libs-min/SYSTEM.def index 72543052a562..77ea228e5ec4 100644 --- a/gcc/m2/gm2-libs-min/SYSTEM.def +++ b/gcc/m2/gm2-libs-min/SYSTEM.def @@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see DEFINITION MODULE SYSTEM ; EXPORT QUALIFIED BITSPERBYTE, BYTESPERWORD, - ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *) + ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, COFF_T, (* @SYSTEM_DATATYPES@ *) ADR, TSIZE ; (* SIZE is also exported if -fpim2 is used *) diff --git a/gcc/m2/gm2-libs/SYSTEM.def b/gcc/m2/gm2-libs/SYSTEM.def index fafd97dbc07b..1b2949eebb0b 100644 --- a/gcc/m2/gm2-libs/SYSTEM.def +++ b/gcc/m2/gm2-libs/SYSTEM.def @@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see DEFINITION MODULE SYSTEM ; EXPORT QUALIFIED BITSPERBYTE, BYTESPERWORD, - ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *) + ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, COFF_T, CARDINAL64, (* @SYSTEM_DATATYPES@ *) ADR, TSIZE, ROTATE, SHIFT, THROW, TBITSIZE ; (* SIZE is also exported if -fpim2 is used. *) diff --git a/gcc/m2/gm2-libs/libc.def b/gcc/m2/gm2-libs/libc.def index 3c43f165eb07..f1f13ddd9aeb 100644 --- a/gcc/m2/gm2-libs/libc.def +++ b/gcc/m2/gm2-libs/libc.def @@ -26,7 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see DEFINITION MODULE FOR "C" libc ; -FROM SYSTEM IMPORT ADDRESS, CSIZE_T, CSSIZE_T ; +FROM SYSTEM IMPORT ADDRESS, CSIZE_T, CSSIZE_T, COFF_T ; EXPORT UNQUALIFIED time_t, timeb, tm, ptrToTM, atof, atoi, atol, atoll, @@ -311,7 +311,7 @@ PROCEDURE creat (filename: ADDRESS; mode: CARDINAL) : INTEGER; off_t lseek(int fildes, off_t offset, int whence); *) -PROCEDURE lseek (fd: INTEGER; offset: CSSIZE_T; whence: INTEGER) : [ CSSIZE_T ] ; +PROCEDURE lseek (fd: INTEGER; offset: CSSIZE_T; whence: INTEGER) : [ COFF_T ] ; (* diff --git a/gcc/m2/lang.opt b/gcc/m2/lang.opt index 655ff9173e4f..1ea55f21e4c7 100644 --- a/gcc/m2/lang.opt +++ b/gcc/m2/lang.opt @@ -154,6 +154,10 @@ fm2-dump-filter= Modula-2 Joined filter the language dump using a comma separated list of procedures and modules +fm2-file-offset-bits= +Modula-2 Joined +override the default 64 bit definition of SYSTEM.COFF_T with the argument specified + fm2-g Modula-2 generate extra nops to improve debugging, producing an instruction for every code related keyword diff --git a/gcc/m2/mc-boot-ch/Glibc.c b/gcc/m2/mc-boot-ch/Glibc.c index e4c910b168a9..1709ccf3a362 100644 --- a/gcc/m2/mc-boot-ch/Glibc.c +++ b/gcc/m2/mc-boot-ch/Glibc.c @@ -356,7 +356,7 @@ off_t libc_lseek (int fd, off_t offset, int whence) { tracedb ("libc_lseek (%s, %p, %d)\n", fd, offset, whence); - int result = lseek (fd, offset, whence); + off_t result = lseek (fd, offset, whence); tracedb_result (result); return result; } diff --git a/gcc/m2/mc-boot/GASCII.cc b/gcc/m2/mc-boot/GASCII.cc index 35e77522b701..72cc6b251330 100644 --- a/gcc/m2/mc-boot/GASCII.cc +++ b/gcc/m2/mc-boot/GASCII.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GASCII.h b/gcc/m2/mc-boot/GASCII.h index 18c272505784..c5a38b227c99 100644 --- a/gcc/m2/mc-boot/GASCII.h +++ b/gcc/m2/mc-boot/GASCII.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_ASCII_H) # define _ASCII_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GArgs.cc b/gcc/m2/mc-boot/GArgs.cc index c87c35e73b69..2aafca77a3b6 100644 --- a/gcc/m2/mc-boot/GArgs.cc +++ b/gcc/m2/mc-boot/GArgs.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GArgs.h b/gcc/m2/mc-boot/GArgs.h index 4a7b4f9c886c..8de0d0f52f0f 100644 --- a/gcc/m2/mc-boot/GArgs.h +++ b/gcc/m2/mc-boot/GArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Args_H) # define _Args_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GAssertion.cc b/gcc/m2/mc-boot/GAssertion.cc index 18d693185f7f..f4185f91cacc 100644 --- a/gcc/m2/mc-boot/GAssertion.cc +++ b/gcc/m2/mc-boot/GAssertion.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GAssertion.h b/gcc/m2/mc-boot/GAssertion.h index 94ca402a2152..0ea29e4f406f 100644 --- a/gcc/m2/mc-boot/GAssertion.h +++ b/gcc/m2/mc-boot/GAssertion.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Assertion_H) # define _Assertion_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GBreak.cc b/gcc/m2/mc-boot/GBreak.cc index f31d4a82b5ad..e8b5d053ac69 100644 --- a/gcc/m2/mc-boot/GBreak.cc +++ b/gcc/m2/mc-boot/GBreak.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GBreak.h b/gcc/m2/mc-boot/GBreak.h index 14bd68e1ee90..c29c8b9d3e06 100644 --- a/gcc/m2/mc-boot/GBreak.h +++ b/gcc/m2/mc-boot/GBreak.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Break_H) # define _Break_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GCOROUTINES.h b/gcc/m2/mc-boot/GCOROUTINES.h index 7543c7e4969c..678a87422484 100644 --- a/gcc/m2/mc-boot/GCOROUTINES.h +++ b/gcc/m2/mc-boot/GCOROUTINES.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_COROUTINES_H) # define _COROUTINES_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GCmdArgs.cc b/gcc/m2/mc-boot/GCmdArgs.cc index 9c0da752714b..220fd0c3a8a9 100644 --- a/gcc/m2/mc-boot/GCmdArgs.cc +++ b/gcc/m2/mc-boot/GCmdArgs.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GCmdArgs.h b/gcc/m2/mc-boot/GCmdArgs.h index b29a52acc0d0..a078d64a06d7 100644 --- a/gcc/m2/mc-boot/GCmdArgs.h +++ b/gcc/m2/mc-boot/GCmdArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_CmdArgs_H) # define _CmdArgs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GDebug.cc b/gcc/m2/mc-boot/GDebug.cc index 4e25f7642802..1aa02a60e591 100644 --- a/gcc/m2/mc-boot/GDebug.cc +++ b/gcc/m2/mc-boot/GDebug.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GDebug.h b/gcc/m2/mc-boot/GDebug.h index b7530ea4d988..c43e363fe14e 100644 --- a/gcc/m2/mc-boot/GDebug.h +++ b/gcc/m2/mc-boot/GDebug.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Debug_H) # define _Debug_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GDynamicStrings.cc b/gcc/m2/mc-boot/GDynamicStrings.cc index 55d2ae8038bc..a409ce79b1b4 100644 --- a/gcc/m2/mc-boot/GDynamicStrings.cc +++ b/gcc/m2/mc-boot/GDynamicStrings.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GDynamicStrings.h b/gcc/m2/mc-boot/GDynamicStrings.h index 1939b73037ae..1860701b310b 100644 --- a/gcc/m2/mc-boot/GDynamicStrings.h +++ b/gcc/m2/mc-boot/GDynamicStrings.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_DynamicStrings_H) # define _DynamicStrings_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GEnvironment.cc b/gcc/m2/mc-boot/GEnvironment.cc index 044fba107975..5a2ad756a053 100644 --- a/gcc/m2/mc-boot/GEnvironment.cc +++ b/gcc/m2/mc-boot/GEnvironment.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GEnvironment.h b/gcc/m2/mc-boot/GEnvironment.h index 3bfadaaebed2..cf58be08b5fb 100644 --- a/gcc/m2/mc-boot/GEnvironment.h +++ b/gcc/m2/mc-boot/GEnvironment.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Environment_H) # define _Environment_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GFIO.cc b/gcc/m2/mc-boot/GFIO.cc index c7f857b265a0..440919af5338 100644 --- a/gcc/m2/mc-boot/GFIO.cc +++ b/gcc/m2/mc-boot/GFIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GFIO.h b/gcc/m2/mc-boot/GFIO.h index 8b69241f1751..3ab2c518da4a 100644 --- a/gcc/m2/mc-boot/GFIO.h +++ b/gcc/m2/mc-boot/GFIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FIO_H) # define _FIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GFormatStrings.cc b/gcc/m2/mc-boot/GFormatStrings.cc index f4c4fd6f8c10..e2ea1954d191 100644 --- a/gcc/m2/mc-boot/GFormatStrings.cc +++ b/gcc/m2/mc-boot/GFormatStrings.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GFormatStrings.h b/gcc/m2/mc-boot/GFormatStrings.h index 6ab12c4ef02b..61e84541e513 100644 --- a/gcc/m2/mc-boot/GFormatStrings.h +++ b/gcc/m2/mc-boot/GFormatStrings.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FormatStrings_H) # define _FormatStrings_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GFpuIO.cc b/gcc/m2/mc-boot/GFpuIO.cc index 6bd6a6bc59fd..3fdd5fd2925d 100644 --- a/gcc/m2/mc-boot/GFpuIO.cc +++ b/gcc/m2/mc-boot/GFpuIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GFpuIO.h b/gcc/m2/mc-boot/GFpuIO.h index 1c6670d6c82b..1b6f9573ebc1 100644 --- a/gcc/m2/mc-boot/GFpuIO.h +++ b/gcc/m2/mc-boot/GFpuIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_FpuIO_H) # define _FpuIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GIO.cc b/gcc/m2/mc-boot/GIO.cc index 6e0ae3150a34..a64f401a7161 100644 --- a/gcc/m2/mc-boot/GIO.cc +++ b/gcc/m2/mc-boot/GIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GIO.h b/gcc/m2/mc-boot/GIO.h index d01d69a65168..4037cfdef4c7 100644 --- a/gcc/m2/mc-boot/GIO.h +++ b/gcc/m2/mc-boot/GIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_IO_H) # define _IO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GIndexing.cc b/gcc/m2/mc-boot/GIndexing.cc index 5ab0c4296aaf..a38a4776c8c4 100644 --- a/gcc/m2/mc-boot/GIndexing.cc +++ b/gcc/m2/mc-boot/GIndexing.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GIndexing.h b/gcc/m2/mc-boot/GIndexing.h index e1054b026fd8..f6a58cf9b547 100644 --- a/gcc/m2/mc-boot/GIndexing.h +++ b/gcc/m2/mc-boot/GIndexing.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_Indexing_H) # define _Indexing_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GM2Dependent.cc b/gcc/m2/mc-boot/GM2Dependent.cc index e8ade8773a14..32f204fbbbce 100644 --- a/gcc/m2/mc-boot/GM2Dependent.cc +++ b/gcc/m2/mc-boot/GM2Dependent.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GM2Dependent.h b/gcc/m2/mc-boot/GM2Dependent.h index b9ad0c780b8c..f95d585ed96a 100644 --- a/gcc/m2/mc-boot/GM2Dependent.h +++ b/gcc/m2/mc-boot/GM2Dependent.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2Dependent_H) # define _M2Dependent_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GM2EXCEPTION.cc b/gcc/m2/mc-boot/GM2EXCEPTION.cc index 62d47f08b5b5..e2d89e0cb374 100644 --- a/gcc/m2/mc-boot/GM2EXCEPTION.cc +++ b/gcc/m2/mc-boot/GM2EXCEPTION.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GM2EXCEPTION.h b/gcc/m2/mc-boot/GM2EXCEPTION.h index 6f6b2f6712b6..66eb23ab12f0 100644 --- a/gcc/m2/mc-boot/GM2EXCEPTION.h +++ b/gcc/m2/mc-boot/GM2EXCEPTION.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2EXCEPTION_H) # define _M2EXCEPTION_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GM2RTS.cc b/gcc/m2/mc-boot/GM2RTS.cc index b2361270e645..7149c1865dcd 100644 --- a/gcc/m2/mc-boot/GM2RTS.cc +++ b/gcc/m2/mc-boot/GM2RTS.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> @@ -496,6 +497,7 @@ extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_ memcpy (function, function_, _function_high+1); M2RTS_ErrorMessage ((const char *) description, _description_high, (const char *) filename, _filename_high, line, (const char *) function, _function_high); + libc_exit (1); } @@ -508,6 +510,7 @@ extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_ extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line) { ErrorMessageC (description, filename, line, function); + libc_exit (1); } diff --git a/gcc/m2/mc-boot/GM2RTS.h b/gcc/m2/mc-boot/GM2RTS.h index ea6eabae9714..a1dbf88e2b63 100644 --- a/gcc/m2/mc-boot/GM2RTS.h +++ b/gcc/m2/mc-boot/GM2RTS.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_M2RTS_H) # define _M2RTS_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GMemUtils.cc b/gcc/m2/mc-boot/GMemUtils.cc index 828144fb0235..4bdbe3e83448 100644 --- a/gcc/m2/mc-boot/GMemUtils.cc +++ b/gcc/m2/mc-boot/GMemUtils.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GMemUtils.h b/gcc/m2/mc-boot/GMemUtils.h index 38a843417d96..9fd5e46e7902 100644 --- a/gcc/m2/mc-boot/GMemUtils.h +++ b/gcc/m2/mc-boot/GMemUtils.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_MemUtils_H) # define _MemUtils_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GNumberIO.cc b/gcc/m2/mc-boot/GNumberIO.cc index 8a04cbff7e63..9de7a51353af 100644 --- a/gcc/m2/mc-boot/GNumberIO.cc +++ b/gcc/m2/mc-boot/GNumberIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GNumberIO.h b/gcc/m2/mc-boot/GNumberIO.h index 13960e966075..b40c33d0316e 100644 --- a/gcc/m2/mc-boot/GNumberIO.h +++ b/gcc/m2/mc-boot/GNumberIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_NumberIO_H) # define _NumberIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GPushBackInput.cc b/gcc/m2/mc-boot/GPushBackInput.cc index 60fb12ef898e..e526bf7438e5 100644 --- a/gcc/m2/mc-boot/GPushBackInput.cc +++ b/gcc/m2/mc-boot/GPushBackInput.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GPushBackInput.h b/gcc/m2/mc-boot/GPushBackInput.h index c2e034429481..b747e50baa4c 100644 --- a/gcc/m2/mc-boot/GPushBackInput.h +++ b/gcc/m2/mc-boot/GPushBackInput.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_PushBackInput_H) # define _PushBackInput_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTExceptions.cc b/gcc/m2/mc-boot/GRTExceptions.cc index 2f84fa638c30..881d97de1ec6 100644 --- a/gcc/m2/mc-boot/GRTExceptions.cc +++ b/gcc/m2/mc-boot/GRTExceptions.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GRTExceptions.h b/gcc/m2/mc-boot/GRTExceptions.h index 24f3da38d6c3..3d70cb359467 100644 --- a/gcc/m2/mc-boot/GRTExceptions.h +++ b/gcc/m2/mc-boot/GRTExceptions.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTExceptions_H) # define _RTExceptions_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTco.h b/gcc/m2/mc-boot/GRTco.h index 86c5b0316b17..aa6e92836354 100644 --- a/gcc/m2/mc-boot/GRTco.h +++ b/gcc/m2/mc-boot/GRTco.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTco_H) # define _RTco_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTentity.h b/gcc/m2/mc-boot/GRTentity.h index 381ba680b634..6f54002aa311 100644 --- a/gcc/m2/mc-boot/GRTentity.h +++ b/gcc/m2/mc-boot/GRTentity.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTentity_H) # define _RTentity_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GRTint.cc b/gcc/m2/mc-boot/GRTint.cc index 188b6e0a9a24..8f0f81036c32 100644 --- a/gcc/m2/mc-boot/GRTint.cc +++ b/gcc/m2/mc-boot/GRTint.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GRTint.h b/gcc/m2/mc-boot/GRTint.h index daf64ecaae62..703dfb4c04ea 100644 --- a/gcc/m2/mc-boot/GRTint.h +++ b/gcc/m2/mc-boot/GRTint.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_RTint_H) # define _RTint_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSArgs.cc b/gcc/m2/mc-boot/GSArgs.cc index 414ea1f004e2..cd4514ef8ddd 100644 --- a/gcc/m2/mc-boot/GSArgs.cc +++ b/gcc/m2/mc-boot/GSArgs.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GSArgs.h b/gcc/m2/mc-boot/GSArgs.h index 5164cca0bff8..70cab3886989 100644 --- a/gcc/m2/mc-boot/GSArgs.h +++ b/gcc/m2/mc-boot/GSArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SArgs_H) # define _SArgs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSFIO.cc b/gcc/m2/mc-boot/GSFIO.cc index 6ae0d5e04855..06fabab34f42 100644 --- a/gcc/m2/mc-boot/GSFIO.cc +++ b/gcc/m2/mc-boot/GSFIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GSFIO.h b/gcc/m2/mc-boot/GSFIO.h index 42ffc48782a6..e7fba7ebf7c8 100644 --- a/gcc/m2/mc-boot/GSFIO.h +++ b/gcc/m2/mc-boot/GSFIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SFIO_H) # define _SFIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSYSTEM.h b/gcc/m2/mc-boot/GSYSTEM.h index e3d51ab97d58..125787f008a7 100644 --- a/gcc/m2/mc-boot/GSYSTEM.h +++ b/gcc/m2/mc-boot/GSYSTEM.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SYSTEM_H) # define _SYSTEM_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSelective.h b/gcc/m2/mc-boot/GSelective.h index af2e9c31feaa..31f5932fedbb 100644 --- a/gcc/m2/mc-boot/GSelective.h +++ b/gcc/m2/mc-boot/GSelective.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Selective_H) # define _Selective_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStdIO.cc b/gcc/m2/mc-boot/GStdIO.cc index e485eeb25752..85eebf4c8349 100644 --- a/gcc/m2/mc-boot/GStdIO.cc +++ b/gcc/m2/mc-boot/GStdIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GStdIO.h b/gcc/m2/mc-boot/GStdIO.h index b01480ac33a9..0418234bbb2f 100644 --- a/gcc/m2/mc-boot/GStdIO.h +++ b/gcc/m2/mc-boot/GStdIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StdIO_H) # define _StdIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStorage.cc b/gcc/m2/mc-boot/GStorage.cc index f668201059f5..b19616f4ab55 100644 --- a/gcc/m2/mc-boot/GStorage.cc +++ b/gcc/m2/mc-boot/GStorage.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GStorage.h b/gcc/m2/mc-boot/GStorage.h index f352d19f9644..e85fd7aeefa7 100644 --- a/gcc/m2/mc-boot/GStorage.h +++ b/gcc/m2/mc-boot/GStorage.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Storage_H) # define _Storage_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStrCase.cc b/gcc/m2/mc-boot/GStrCase.cc index 40323ca949f7..f33f5a52ac90 100644 --- a/gcc/m2/mc-boot/GStrCase.cc +++ b/gcc/m2/mc-boot/GStrCase.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GStrCase.h b/gcc/m2/mc-boot/GStrCase.h index 3762f57acac0..66b4f689fd09 100644 --- a/gcc/m2/mc-boot/GStrCase.h +++ b/gcc/m2/mc-boot/GStrCase.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrCase_H) # define _StrCase_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStrIO.cc b/gcc/m2/mc-boot/GStrIO.cc index 533460b63f70..46c392bb8a26 100644 --- a/gcc/m2/mc-boot/GStrIO.cc +++ b/gcc/m2/mc-boot/GStrIO.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GStrIO.h b/gcc/m2/mc-boot/GStrIO.h index 24b31a992d5d..66ef3d4331c7 100644 --- a/gcc/m2/mc-boot/GStrIO.h +++ b/gcc/m2/mc-boot/GStrIO.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrIO_H) # define _StrIO_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStrLib.cc b/gcc/m2/mc-boot/GStrLib.cc index dbde45c91226..bc3c5e8c3881 100644 --- a/gcc/m2/mc-boot/GStrLib.cc +++ b/gcc/m2/mc-boot/GStrLib.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GStrLib.h b/gcc/m2/mc-boot/GStrLib.h index e79eb7098456..2b11e84ca448 100644 --- a/gcc/m2/mc-boot/GStrLib.h +++ b/gcc/m2/mc-boot/GStrLib.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StrLib_H) # define _StrLib_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GStringConvert.cc b/gcc/m2/mc-boot/GStringConvert.cc index e552244fec55..ae50e99c2ab9 100644 --- a/gcc/m2/mc-boot/GStringConvert.cc +++ b/gcc/m2/mc-boot/GStringConvert.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GStringConvert.h b/gcc/m2/mc-boot/GStringConvert.h index 95f1bc1b5292..035ad56a52ad 100644 --- a/gcc/m2/mc-boot/GStringConvert.h +++ b/gcc/m2/mc-boot/GStringConvert.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_StringConvert_H) # define _StringConvert_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSysExceptions.h b/gcc/m2/mc-boot/GSysExceptions.h index 928a0c1667de..ef9a6a0f2d9d 100644 --- a/gcc/m2/mc-boot/GSysExceptions.h +++ b/gcc/m2/mc-boot/GSysExceptions.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SysExceptions_H) # define _SysExceptions_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GSysStorage.cc b/gcc/m2/mc-boot/GSysStorage.cc index 1c0cb839ef41..906910bf3d8b 100644 --- a/gcc/m2/mc-boot/GSysStorage.cc +++ b/gcc/m2/mc-boot/GSysStorage.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GSysStorage.h b/gcc/m2/mc-boot/GSysStorage.h index 3c1f310ff0eb..930b3bae6cc2 100644 --- a/gcc/m2/mc-boot/GSysStorage.h +++ b/gcc/m2/mc-boot/GSysStorage.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SysStorage_H) # define _SysStorage_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GTimeString.cc b/gcc/m2/mc-boot/GTimeString.cc index b1d6e6e1e508..fc9b8ada831b 100644 --- a/gcc/m2/mc-boot/GTimeString.cc +++ b/gcc/m2/mc-boot/GTimeString.cc @@ -25,6 +25,7 @@ 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/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GTimeString.h b/gcc/m2/mc-boot/GTimeString.h index c442abb2c22f..6323436d70c2 100644 --- a/gcc/m2/mc-boot/GTimeString.h +++ b/gcc/m2/mc-boot/GTimeString.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_TimeString_H) # define _TimeString_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GUnixArgs.h b/gcc/m2/mc-boot/GUnixArgs.h index 59ba2ac123ec..79a1ea948d3a 100644 --- a/gcc/m2/mc-boot/GUnixArgs.h +++ b/gcc/m2/mc-boot/GUnixArgs.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_UnixArgs_H) # define _UnixArgs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Galists.cc b/gcc/m2/mc-boot/Galists.cc index 7c42dd45625f..09bfdccc49f8 100644 --- a/gcc/m2/mc-boot/Galists.cc +++ b/gcc/m2/mc-boot/Galists.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Galists.h b/gcc/m2/mc-boot/Galists.h index bda3ac6bf1f5..fdacd985785b 100644 --- a/gcc/m2/mc-boot/Galists.h +++ b/gcc/m2/mc-boot/Galists.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_alists_H) # define _alists_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gdecl.cc b/gcc/m2/mc-boot/Gdecl.cc index ea22d064f688..292c654fa66b 100644 --- a/gcc/m2/mc-boot/Gdecl.cc +++ b/gcc/m2/mc-boot/Gdecl.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> @@ -210,7 +211,7 @@ typedef struct decl__T1_r decl__T1; typedef decl__T1 *decl_group; -typedef enum {decl_explist, decl_funccall, decl_exit, decl_return, decl_stmtseq, decl_comment, decl_halt, decl_new, decl_dispose, decl_inc, decl_dec, decl_incl, decl_excl, decl_length, decl_nil, decl_true, decl_false, decl_address, decl_loc, decl_byte, decl_word, decl_csizet, decl_cssizet, decl_char, decl_cardinal, decl_longcard, decl_shortcard, decl_integer, decl_longint, decl_shortint, decl_real, decl_longreal, decl_shortreal, decl_bitset, decl_boolean, decl_proc, decl_ztype, decl_rtype, decl_complex, decl_longcomplex, decl_shortcomplex, decl_type, decl_record, decl_varient, decl_var, decl_enumeration, decl_subrange, decl_array, decl_subscript, decl_string, decl_const, decl_literal, decl_varparam, decl_param, decl_varargs, decl_optarg, decl_pointer, decl_recordfield, decl_varientfield, decl_enumerationfield, decl_set, decl_proctype, decl_procedure, decl_def, decl_imp, decl_module, decl_loop, decl_while, decl_for, decl_repeat, decl_case, decl_caselabellist, decl_caselist, decl_range, decl_assignment, decl_if, decl_elsif, decl_constexp, decl_neg, decl_cast, decl_val, decl_plus, decl_sub, decl_div, decl_mod, decl_mult, decl_divide, decl_in, decl_adr, decl_size, decl_tsize, decl_ord, decl_float, decl_trunc, decl_chr, decl_abs, decl_cap, decl_high, decl_throw, decl_unreachable, decl_cmplx, decl_re, decl_im, decl_min, decl_max, decl_componentref, decl_pointerref, decl_arrayref, decl_deref, decl_equal, decl_notequal, decl_less, decl_greater, decl_greequal, decl_lessequal, decl_lsl, decl_lsr, decl_lor, decl_land, decl_lnot, decl_lxor, decl_and, decl_or, decl_not, decl_identlist, decl_vardecl, decl_setvalue, decl_opaquecast} decl_nodeT; +typedef enum {decl_explist, decl_funccall, decl_exit, decl_return, decl_stmtseq, decl_comment, decl_halt, decl_new, decl_dispose, decl_inc, decl_dec, decl_incl, decl_excl, decl_length, decl_nil, decl_true, decl_false, decl_address, decl_loc, decl_byte, decl_word, decl_csizet, decl_cssizet, decl_cofft, decl_cardinal64, decl_char, decl_cardinal, decl_longcard, decl_shortcard, decl_integer, decl_longint, decl_shortint, decl_real, decl_longreal, decl_shortreal, decl_bitset, decl_boolean, decl_proc, decl_ztype, decl_rtype, decl_complex, decl_longcomplex, decl_shortcomplex, decl_type, decl_record, decl_varient, decl_var, decl_enumeration, decl_subrange, decl_array, decl_subscript, decl_string, decl_const, decl_literal, decl_varparam, decl_param, decl_varargs, decl_optarg, decl_pointer, decl_recordfield, decl_varientfield, decl_enumerationfield, decl_set, decl_proctype, decl_procedure, decl_def, decl_imp, decl_module, decl_loop, decl_while, decl_for, decl_repeat, decl_case, decl_caselabellist, decl_caselist, decl_range, decl_assignment, decl_if, decl_elsif, decl_constexp, decl_neg, decl_cast, decl_val, decl_plus, decl_sub, decl_div, decl_mod, decl_mult, decl_divide, decl_in, decl_adr, decl_size, decl_tsize, decl_ord, decl_float, decl_trunc, decl_chr, decl_abs, decl_cap, decl_high, decl_throw, decl_unreachable, decl_cmplx, decl_re, decl_im, decl_min, decl_max, decl_componentref, decl_pointerref, decl_arrayref, decl_deref, decl_equal, decl_notequal, decl_less, decl_greater, decl_greequal, decl_lessequal, decl_lsl, decl_lsr, decl_lor, decl_land, decl_lnot, decl_lxor, decl_and, decl_or, decl_not, decl_identlist, decl_vardecl, decl_setvalue, decl_opaquecast} decl_nodeT; typedef enum {decl_ansiC, decl_ansiCP, decl_pim4} decl_language; @@ -744,6 +745,8 @@ static decl_node__opaque byteN; static decl_node__opaque wordN; static decl_node__opaque csizetN; static decl_node__opaque cssizetN; +static decl_node__opaque cofftN; +static decl_node__opaque cardinal64N; static decl_node__opaque adrN; static decl_node__opaque sizeN; static decl_node__opaque tsizeN; @@ -1155,7 +1158,7 @@ extern "C" bool decl_isProcType (decl_node n); extern "C" bool decl_isPointer (decl_node n); /* - isProcedure - returns TRUE if, n, is a procedure. + isProcedure - returns TRUE if node, n, is a procedure. */ extern "C" bool decl_isProcedure (decl_node n); @@ -7847,6 +7850,8 @@ static decl_node__opaque makeBase (decl_nodeT k) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: case decl_char: case decl_cardinal: case decl_longcard: @@ -7910,6 +7915,8 @@ static bool isOrdinal (decl_node__opaque n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: case decl_char: case decl_integer: case decl_longint: @@ -8077,6 +8084,14 @@ static decl_node__opaque doGetExprType (decl_node__opaque n) return n; break; + case decl_cofft: + return n; + break; + + case decl_cardinal64: + return n; + break; + case decl_boolean: /* base types. */ return n; @@ -9890,6 +9905,8 @@ static void doExprC (mcPretty_pretty p, decl_node__opaque n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: doSystemC (p, n); break; @@ -12971,26 +12988,13 @@ static bool isSystem (decl_node__opaque n) switch (n->kind) { case decl_address: - return true; - break; - case decl_loc: - return true; - break; - case decl_byte: - return true; - break; - case decl_word: - return true; - break; - case decl_csizet: - return true; - break; - case decl_cssizet: + case decl_cofft: + case decl_cardinal64: return true; break; @@ -13043,6 +13047,16 @@ static void doSystemC (mcPretty_pretty p, decl_node__opaque n) keyc_useSSize_t (); break; + case decl_cofft: + outText (p, (const char *) "off_t", 5); + mcPretty_setNeedSpace (p); + break; + + case decl_cardinal64: + outText (p, (const char *) "uint64_t", 8); + mcPretty_setNeedSpace (p); + break; + default: CaseException ("../../gcc/m2/mc/decl.def", 20, 1); @@ -18846,6 +18860,8 @@ static decl_dependentState doDependants (alists_alist l, decl_node__opaque n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: case decl_boolean: case decl_char: case decl_cardinal: @@ -19850,6 +19866,8 @@ static void visitDependants (alists_alist v, decl_node__opaque n, decl_nodeProce case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: case decl_char: case decl_cardinal: case decl_longcard: @@ -20168,6 +20186,8 @@ static DynamicStrings_String genKind (decl_node__opaque n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: case decl_char: case decl_cardinal: case decl_longcard: @@ -21676,6 +21696,8 @@ static void doSystemM2 (mcPretty_pretty p, decl_node__opaque n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: doNameM2 (p, n); break; @@ -22781,6 +22803,8 @@ static decl_node__opaque doDupExpr (decl_node__opaque n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: case decl_boolean: case decl_proc: case decl_char: @@ -22945,6 +22969,8 @@ static void makeSystem (void) wordN = makeBase (decl_word); csizetN = makeBase (decl_csizet); cssizetN = makeBase (decl_cssizet); + cofftN = makeBase (decl_cofft); + cardinal64N = makeBase (decl_cardinal64); adrN = makeBase (decl_adr); tsizeN = makeBase (decl_tsize); throwN = makeBase (decl_throw); @@ -22955,6 +22981,8 @@ static void makeSystem (void) wordN = addToScope (wordN); csizetN = addToScope (csizetN); cssizetN = addToScope (cssizetN); + cofftN = addToScope (cofftN); + cardinal64N = addToScope (cardinal64N); adrN = addToScope (adrN); tsizeN = addToScope (tsizeN); throwN = addToScope (throwN); @@ -22967,6 +22995,8 @@ static void makeSystem (void) addDone (wordN); addDone (csizetN); addDone (cssizetN); + addDone (cofftN); + addDone (cardinal64N); } @@ -23741,6 +23771,14 @@ extern "C" decl_node decl_getType (decl_node n) return n; break; + case decl_cofft: + return n; + break; + + case decl_cardinal64: + return n; + break; + case decl_boolean: /* base types. */ return n; @@ -24222,6 +24260,8 @@ extern "C" decl_node decl_getScope (decl_node n) case decl_word: case decl_csizet: case decl_cssizet: + case decl_cofft: + case decl_cardinal64: return static_cast<decl_node> (systemN); break; @@ -24685,7 +24725,7 @@ extern "C" bool decl_isPointer (decl_node n) /* - isProcedure - returns TRUE if, n, is a procedure. + isProcedure - returns TRUE if node, n, is a procedure. */ extern "C" bool decl_isProcedure (decl_node n) @@ -25281,6 +25321,14 @@ extern "C" nameKey_Name decl_getSymName (decl_node n) return nameKey_makeKey ((const char *) "CSSIZE_T", 8); break; + case decl_cofft: + return nameKey_makeKey ((const char *) "COFF_T", 6); + break; + + case decl_cardinal64: + return nameKey_makeKey ((const char *) "CARDINAL64", 10); + break; + case decl_boolean: /* base types. */ return nameKey_makeKey ((const char *) "BOOLEAN", 7); diff --git a/gcc/m2/mc-boot/Gdecl.h b/gcc/m2/mc-boot/Gdecl.h index a979c52f0959..30e02f0a1e84 100644 --- a/gcc/m2/mc-boot/Gdecl.h +++ b/gcc/m2/mc-boot/Gdecl.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_decl_H) # define _decl_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gdtoa.h b/gcc/m2/mc-boot/Gdtoa.h index d371aeb78511..e58489e01e6d 100644 --- a/gcc/m2/mc-boot/Gdtoa.h +++ b/gcc/m2/mc-boot/Gdtoa.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_dtoa_H) # define _dtoa_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gerrno.h b/gcc/m2/mc-boot/Gerrno.h index 256317afc884..1f8c83a252da 100644 --- a/gcc/m2/mc-boot/Gerrno.h +++ b/gcc/m2/mc-boot/Gerrno.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_errno_H) # define _errno_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gkeyc.cc b/gcc/m2/mc-boot/Gkeyc.cc index 132c2fc7283c..9a35e953d18c 100644 --- a/gcc/m2/mc-boot/Gkeyc.cc +++ b/gcc/m2/mc-boot/Gkeyc.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> @@ -575,6 +576,7 @@ static void checkGccConfigSystem (mcPretty_pretty p) if (! initializedGCC) { initializedGCC = true; + mcPretty_print (p, (const char *) "#define INCLUDE_MEMORY\\n", 24); mcPretty_print (p, (const char *) "#include \"config.h\"\\n", 21); mcPretty_print (p, (const char *) "#include \"system.h\"\\n", 21); checkGccTypes (p); diff --git a/gcc/m2/mc-boot/Gkeyc.h b/gcc/m2/mc-boot/Gkeyc.h index 9a15c93d10f0..8537fbcc86b7 100644 --- a/gcc/m2/mc-boot/Gkeyc.h +++ b/gcc/m2/mc-boot/Gkeyc.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_keyc_H) # define _keyc_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gldtoa.h b/gcc/m2/mc-boot/Gldtoa.h index 6ae682ee13c5..f24ab408bb0c 100644 --- a/gcc/m2/mc-boot/Gldtoa.h +++ b/gcc/m2/mc-boot/Gldtoa.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_ldtoa_H) # define _ldtoa_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Glibc.h b/gcc/m2/mc-boot/Glibc.h index 9987d0ea01dd..cdf441f07741 100644 --- a/gcc/m2/mc-boot/Glibc.h +++ b/gcc/m2/mc-boot/Glibc.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_libc_H) # define _libc_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Glibm.h b/gcc/m2/mc-boot/Glibm.h index 344ac623f0ed..2c5a177735f4 100644 --- a/gcc/m2/mc-boot/Glibm.h +++ b/gcc/m2/mc-boot/Glibm.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_libm_H) # define _libm_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Glists.cc b/gcc/m2/mc-boot/Glists.cc index f29edec1a140..2e459ca910df 100644 --- a/gcc/m2/mc-boot/Glists.cc +++ b/gcc/m2/mc-boot/Glists.cc @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Glists.h b/gcc/m2/mc-boot/Glists.h index 84537a1ffc57..e89a42a4006f 100644 --- a/gcc/m2/mc-boot/Glists.h +++ b/gcc/m2/mc-boot/Glists.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_lists_H) # define _lists_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcComment.cc b/gcc/m2/mc-boot/GmcComment.cc index d5f741e047b7..320c51262890 100644 --- a/gcc/m2/mc-boot/GmcComment.cc +++ b/gcc/m2/mc-boot/GmcComment.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcComment.h b/gcc/m2/mc-boot/GmcComment.h index 10dd5c2781c9..bbb7d2fbb726 100644 --- a/gcc/m2/mc-boot/GmcComment.h +++ b/gcc/m2/mc-boot/GmcComment.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcComment_H) # define _mcComment_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcComp.cc b/gcc/m2/mc-boot/GmcComp.cc index e36fa638c9e7..72c277d203ab 100644 --- a/gcc/m2/mc-boot/GmcComp.cc +++ b/gcc/m2/mc-boot/GmcComp.cc @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcComp.h b/gcc/m2/mc-boot/GmcComp.h index 17e2080d780d..a4e302f6af93 100644 --- a/gcc/m2/mc-boot/GmcComp.h +++ b/gcc/m2/mc-boot/GmcComp.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcComp_H) # define _mcComp_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcDebug.cc b/gcc/m2/mc-boot/GmcDebug.cc index 0085384f2c98..7ded4aee139f 100644 --- a/gcc/m2/mc-boot/GmcDebug.cc +++ b/gcc/m2/mc-boot/GmcDebug.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcDebug.h b/gcc/m2/mc-boot/GmcDebug.h index a46fa13eeb0a..e4ac762d6486 100644 --- a/gcc/m2/mc-boot/GmcDebug.h +++ b/gcc/m2/mc-boot/GmcDebug.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcDebug_H) # define _mcDebug_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcError.cc b/gcc/m2/mc-boot/GmcError.cc index a3df34e77996..4e2921184559 100644 --- a/gcc/m2/mc-boot/GmcError.cc +++ b/gcc/m2/mc-boot/GmcError.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcError.h b/gcc/m2/mc-boot/GmcError.h index 054a4780a728..951f6ae3bbe6 100644 --- a/gcc/m2/mc-boot/GmcError.h +++ b/gcc/m2/mc-boot/GmcError.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcError_H) # define _mcError_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcFileName.cc b/gcc/m2/mc-boot/GmcFileName.cc index 3b516594c595..f0f69129e06c 100644 --- a/gcc/m2/mc-boot/GmcFileName.cc +++ b/gcc/m2/mc-boot/GmcFileName.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcFileName.h b/gcc/m2/mc-boot/GmcFileName.h index 11f1512dbe81..04e08ec8e9a2 100644 --- a/gcc/m2/mc-boot/GmcFileName.h +++ b/gcc/m2/mc-boot/GmcFileName.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcFileName_H) # define _mcFileName_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcLexBuf.cc b/gcc/m2/mc-boot/GmcLexBuf.cc index 4f2293165aea..dd6b87e5a211 100644 --- a/gcc/m2/mc-boot/GmcLexBuf.cc +++ b/gcc/m2/mc-boot/GmcLexBuf.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcLexBuf.h b/gcc/m2/mc-boot/GmcLexBuf.h index ca22526c0a43..bb552aee3fa6 100644 --- a/gcc/m2/mc-boot/GmcLexBuf.h +++ b/gcc/m2/mc-boot/GmcLexBuf.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcLexBuf_H) # define _mcLexBuf_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcMetaError.cc b/gcc/m2/mc-boot/GmcMetaError.cc index af64604534e2..9298d0e41927 100644 --- a/gcc/m2/mc-boot/GmcMetaError.cc +++ b/gcc/m2/mc-boot/GmcMetaError.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcMetaError.h b/gcc/m2/mc-boot/GmcMetaError.h index de244c186fff..ce5e8e1b7952 100644 --- a/gcc/m2/mc-boot/GmcMetaError.h +++ b/gcc/m2/mc-boot/GmcMetaError.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcMetaError_H) # define _mcMetaError_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcOptions.cc b/gcc/m2/mc-boot/GmcOptions.cc index 5a0606047092..f6e4417b6593 100644 --- a/gcc/m2/mc-boot/GmcOptions.cc +++ b/gcc/m2/mc-boot/GmcOptions.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcOptions.h b/gcc/m2/mc-boot/GmcOptions.h index aab560038e22..2db8bcb998a0 100644 --- a/gcc/m2/mc-boot/GmcOptions.h +++ b/gcc/m2/mc-boot/GmcOptions.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcOptions_H) # define _mcOptions_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcPreprocess.cc b/gcc/m2/mc-boot/GmcPreprocess.cc index 741109ad7fbf..54d89bf33e75 100644 --- a/gcc/m2/mc-boot/GmcPreprocess.cc +++ b/gcc/m2/mc-boot/GmcPreprocess.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcPreprocess.h b/gcc/m2/mc-boot/GmcPreprocess.h index 21b4fd458a4f..05e8122a332a 100644 --- a/gcc/m2/mc-boot/GmcPreprocess.h +++ b/gcc/m2/mc-boot/GmcPreprocess.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcPreprocess_H) # define _mcPreprocess_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcPretty.cc b/gcc/m2/mc-boot/GmcPretty.cc index 0bffa1ff6feb..c0be8c1e4991 100644 --- a/gcc/m2/mc-boot/GmcPretty.cc +++ b/gcc/m2/mc-boot/GmcPretty.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcPretty.h b/gcc/m2/mc-boot/GmcPretty.h index d6834e2f9004..95d7a0b13ae2 100644 --- a/gcc/m2/mc-boot/GmcPretty.h +++ b/gcc/m2/mc-boot/GmcPretty.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcPretty_H) # define _mcPretty_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcPrintf.cc b/gcc/m2/mc-boot/GmcPrintf.cc index e91e55acc14c..dafa728437fd 100644 --- a/gcc/m2/mc-boot/GmcPrintf.cc +++ b/gcc/m2/mc-boot/GmcPrintf.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcPrintf.h b/gcc/m2/mc-boot/GmcPrintf.h index ca1129a26ef7..6d70a6db6a5e 100644 --- a/gcc/m2/mc-boot/GmcPrintf.h +++ b/gcc/m2/mc-boot/GmcPrintf.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcPrintf_H) # define _mcPrintf_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcQuiet.cc b/gcc/m2/mc-boot/GmcQuiet.cc index d0f2f009b2a8..3309f13d736c 100644 --- a/gcc/m2/mc-boot/GmcQuiet.cc +++ b/gcc/m2/mc-boot/GmcQuiet.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcQuiet.h b/gcc/m2/mc-boot/GmcQuiet.h index b84144c9f30b..6eebb3b69cdb 100644 --- a/gcc/m2/mc-boot/GmcQuiet.h +++ b/gcc/m2/mc-boot/GmcQuiet.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcQuiet_H) # define _mcQuiet_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcReserved.cc b/gcc/m2/mc-boot/GmcReserved.cc index a42f1b1b0acb..02132e48b4b8 100644 --- a/gcc/m2/mc-boot/GmcReserved.cc +++ b/gcc/m2/mc-boot/GmcReserved.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcReserved.h b/gcc/m2/mc-boot/GmcReserved.h index 8c5adca465a8..18e15f6247ee 100644 --- a/gcc/m2/mc-boot/GmcReserved.h +++ b/gcc/m2/mc-boot/GmcReserved.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcReserved_H) # define _mcReserved_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcSearch.cc b/gcc/m2/mc-boot/GmcSearch.cc index e1a2aa63e29d..14d3e3fe0abd 100644 --- a/gcc/m2/mc-boot/GmcSearch.cc +++ b/gcc/m2/mc-boot/GmcSearch.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcSearch.h b/gcc/m2/mc-boot/GmcSearch.h index 277f55858496..4ea92e0c0fa7 100644 --- a/gcc/m2/mc-boot/GmcSearch.h +++ b/gcc/m2/mc-boot/GmcSearch.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcSearch_H) # define _mcSearch_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcStack.cc b/gcc/m2/mc-boot/GmcStack.cc index 70f937b42991..8edae475e6de 100644 --- a/gcc/m2/mc-boot/GmcStack.cc +++ b/gcc/m2/mc-boot/GmcStack.cc @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcStack.h b/gcc/m2/mc-boot/GmcStack.h index fe790ced8933..ee1fad402fc7 100644 --- a/gcc/m2/mc-boot/GmcStack.h +++ b/gcc/m2/mc-boot/GmcStack.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcStack_H) # define _mcStack_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GmcStream.cc b/gcc/m2/mc-boot/GmcStream.cc index f970dd61c2e5..a35ee25294f1 100644 --- a/gcc/m2/mc-boot/GmcStream.cc +++ b/gcc/m2/mc-boot/GmcStream.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GmcStream.h b/gcc/m2/mc-boot/GmcStream.h index 6fef979e5fb7..0584dd743c3a 100644 --- a/gcc/m2/mc-boot/GmcStream.h +++ b/gcc/m2/mc-boot/GmcStream.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcStream_H) # define _mcStream_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcflex.h b/gcc/m2/mc-boot/Gmcflex.h index b6a3d0a03d7a..739c99267e93 100644 --- a/gcc/m2/mc-boot/Gmcflex.h +++ b/gcc/m2/mc-boot/Gmcflex.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcflex_H) # define _mcflex_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp1.cc b/gcc/m2/mc-boot/Gmcp1.cc index 389c1381bf35..cb0d1ad1698d 100644 --- a/gcc/m2/mc-boot/Gmcp1.cc +++ b/gcc/m2/mc-boot/Gmcp1.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see <https://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gmcp1.h b/gcc/m2/mc-boot/Gmcp1.h index 2bc44047820e..428f312a6d62 100644 --- a/gcc/m2/mc-boot/Gmcp1.h +++ b/gcc/m2/mc-boot/Gmcp1.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp1_H) # define _mcp1_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp2.cc b/gcc/m2/mc-boot/Gmcp2.cc index 88ff478ce70d..bfd3e0c5b62b 100644 --- a/gcc/m2/mc-boot/Gmcp2.cc +++ b/gcc/m2/mc-boot/Gmcp2.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see <https://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gmcp2.h b/gcc/m2/mc-boot/Gmcp2.h index 080c4fae9625..8fc92ea91122 100644 --- a/gcc/m2/mc-boot/Gmcp2.h +++ b/gcc/m2/mc-boot/Gmcp2.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp2_H) # define _mcp2_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp3.cc b/gcc/m2/mc-boot/Gmcp3.cc index aa8b7338d13a..f345cf666fb2 100644 --- a/gcc/m2/mc-boot/Gmcp3.cc +++ b/gcc/m2/mc-boot/Gmcp3.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see <https://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gmcp3.h b/gcc/m2/mc-boot/Gmcp3.h index 231e6f0cc7a0..d58349f1998d 100644 --- a/gcc/m2/mc-boot/Gmcp3.h +++ b/gcc/m2/mc-boot/Gmcp3.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp3_H) # define _mcp3_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp4.cc b/gcc/m2/mc-boot/Gmcp4.cc index 5cf2ec15de3a..872b7b102c58 100644 --- a/gcc/m2/mc-boot/Gmcp4.cc +++ b/gcc/m2/mc-boot/Gmcp4.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see <https://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gmcp4.h b/gcc/m2/mc-boot/Gmcp4.h index 826cba6809e5..c374b34bf777 100644 --- a/gcc/m2/mc-boot/Gmcp4.h +++ b/gcc/m2/mc-boot/Gmcp4.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp4_H) # define _mcp4_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gmcp5.cc b/gcc/m2/mc-boot/Gmcp5.cc index 20b006cab71b..0fa727a7fc35 100644 --- a/gcc/m2/mc-boot/Gmcp5.cc +++ b/gcc/m2/mc-boot/Gmcp5.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING. If not, see <https://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gmcp5.h b/gcc/m2/mc-boot/Gmcp5.h index 001f08436691..44cb6ce2b50a 100644 --- a/gcc/m2/mc-boot/Gmcp5.h +++ b/gcc/m2/mc-boot/Gmcp5.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_mcp5_H) # define _mcp5_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GnameKey.cc b/gcc/m2/mc-boot/GnameKey.cc index ea52ccbc3fe3..128ac93c9bcd 100644 --- a/gcc/m2/mc-boot/GnameKey.cc +++ b/gcc/m2/mc-boot/GnameKey.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GnameKey.h b/gcc/m2/mc-boot/GnameKey.h index 8204133d61f5..1ef63030a956 100644 --- a/gcc/m2/mc-boot/GnameKey.h +++ b/gcc/m2/mc-boot/GnameKey.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_nameKey_H) # define _nameKey_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/GsymbolKey.cc b/gcc/m2/mc-boot/GsymbolKey.cc index 612329751879..c9848d543074 100644 --- a/gcc/m2/mc-boot/GsymbolKey.cc +++ b/gcc/m2/mc-boot/GsymbolKey.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/GsymbolKey.h b/gcc/m2/mc-boot/GsymbolKey.h index be8d8ed9f764..82c2fe114224 100644 --- a/gcc/m2/mc-boot/GsymbolKey.h +++ b/gcc/m2/mc-boot/GsymbolKey.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_symbolKey_H) # define _symbolKey_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gtermios.h b/gcc/m2/mc-boot/Gtermios.h index fc6cf989f7ea..a95e43fa3373 100644 --- a/gcc/m2/mc-boot/Gtermios.h +++ b/gcc/m2/mc-boot/Gtermios.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_termios_H) # define _termios_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gtop.cc b/gcc/m2/mc-boot/Gtop.cc index 34c5b27edd2c..ba492e5acbf5 100644 --- a/gcc/m2/mc-boot/Gtop.cc +++ b/gcc/m2/mc-boot/Gtop.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gvarargs.cc b/gcc/m2/mc-boot/Gvarargs.cc index c9ba44d3439b..0f517c4d9d63 100644 --- a/gcc/m2/mc-boot/Gvarargs.cc +++ b/gcc/m2/mc-boot/Gvarargs.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gvarargs.h b/gcc/m2/mc-boot/Gvarargs.h index b68ca9fad568..9ac674ca5d65 100644 --- a/gcc/m2/mc-boot/Gvarargs.h +++ b/gcc/m2/mc-boot/Gvarargs.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_varargs_H) # define _varargs_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gwlists.cc b/gcc/m2/mc-boot/Gwlists.cc index 68482482ae15..adf86f80dd83 100644 --- a/gcc/m2/mc-boot/Gwlists.cc +++ b/gcc/m2/mc-boot/Gwlists.cc @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with GNU Modula-2; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define INCLUDE_MEMORY #include "config.h" #include "system.h" #include <stdbool.h> diff --git a/gcc/m2/mc-boot/Gwlists.h b/gcc/m2/mc-boot/Gwlists.h index fe07de5e5d96..424cdfb57ed8 100644 --- a/gcc/m2/mc-boot/Gwlists.h +++ b/gcc/m2/mc-boot/Gwlists.h @@ -24,6 +24,7 @@ along with GNU Modula-2; see the file COPYING3. If not see #if !defined (_wlists_H) # define _wlists_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc-boot/Gwrapc.h b/gcc/m2/mc-boot/Gwrapc.h index 4d77e274c3c0..d36d74ccd4a9 100644 --- a/gcc/m2/mc-boot/Gwrapc.h +++ b/gcc/m2/mc-boot/Gwrapc.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_wrapc_H) # define _wrapc_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/mc/decl.mod b/gcc/m2/mc/decl.mod index 2617cf6e5957..342487e398db 100644 --- a/gcc/m2/mc/decl.mod +++ b/gcc/m2/mc/decl.mod @@ -94,7 +94,8 @@ TYPE nil, true, false, (* system types. *) address, loc, byte, word, - csizet, cssizet, + csizet, cssizet, cofft, + cardinal64, (* base types. *) char, cardinal, longcard, shortcard, @@ -159,7 +160,9 @@ TYPE byte, word, csizet, - cssizet : | + cssizet, + cofft, + cardinal64 : | (* base types. *) boolean, proc, @@ -738,6 +741,8 @@ VAR wordN, csizetN, cssizetN, + cofftN, + cardinal64N, adrN, sizeN, tsizeN, @@ -1460,17 +1465,6 @@ BEGIN END isAProcType ; -(* - isProcedure - returns TRUE if, n, is a procedure. -*) - -PROCEDURE isProcedure (n: node) : BOOLEAN ; -BEGIN - assert (n # NIL) ; - RETURN n^.kind = procedure -END isProcedure ; - - (* isPointer - returns TRUE if, n, is a pointer. *) @@ -4378,6 +4372,9 @@ BEGIN word : RETURN makeKey ('WORD') | csizet : RETURN makeKey ('CSIZE_T') | cssizet : RETURN makeKey ('CSSIZE_T') | + cofft : RETURN makeKey ('COFF_T') | + cardinal64 : RETURN makeKey ('CARDINAL64') | + (* base types. *) boolean : RETURN makeKey ('BOOLEAN') | proc : RETURN makeKey ('PROC') | @@ -4988,6 +4985,8 @@ BEGIN word, csizet, cssizet, + cofft, + cardinal64, char, cardinal, longcard, @@ -5126,6 +5125,8 @@ BEGIN word, csizet, cssizet, + cofft, + cardinal64, char, integer, longint, @@ -5166,6 +5167,8 @@ BEGIN word : RETURN n | csizet : RETURN n | cssizet : RETURN n | + cofft : RETURN n | + cardinal64 : RETURN n | (* base types. *) boolean : RETURN n | proc : RETURN n | @@ -5367,6 +5370,8 @@ BEGIN word : RETURN n | csizet : RETURN n | cssizet : RETURN n | + cofft : RETURN n | + cardinal64 : RETURN n | (* base types. *) boolean : RETURN n | proc : RETURN n | @@ -5538,7 +5543,9 @@ BEGIN byte, word, csizet, - cssizet : RETURN systemN | + cssizet, + cofft, + cardinal64 : RETURN systemN | (* base types. *) boolean, proc, @@ -6672,7 +6679,9 @@ BEGIN byte, word, csizet, - cssizet : doSystemC (p, n) | + cssizet, + cofft, + cardinal64 : doSystemC (p, n) | type : doTypeNameC (p, n) | pointer : doTypeNameC (p, n) @@ -8974,12 +8983,14 @@ PROCEDURE isSystem (n: node) : BOOLEAN ; BEGIN CASE n^.kind OF - address: RETURN TRUE | - loc : RETURN TRUE | - byte : RETURN TRUE | - word : RETURN TRUE | - csizet : RETURN TRUE | - cssizet: RETURN TRUE + address, + loc, + byte, + word, + csizet, + cssizet, + cofft, + cardinal64: RETURN TRUE ELSE RETURN FALSE @@ -9000,7 +9011,9 @@ BEGIN byte : outText (p, 'unsigned char') ; setNeedSpace (p) | word : outText (p, 'unsigned int') ; setNeedSpace (p) | csizet : outText (p, 'size_t') ; setNeedSpace (p) ; keyc.useSize_t | - cssizet: outText (p, 'ssize_t') ; setNeedSpace (p) ; keyc.useSSize_t + cssizet : outText (p, 'ssize_t') ; setNeedSpace (p) ; keyc.useSSize_t | + cofft : outText (p, 'off_t') ; setNeedSpace (p) | + cardinal64: outText (p, 'uint64_t') ; setNeedSpace (p) END END doSystemC ; @@ -14084,6 +14097,8 @@ BEGIN word, csizet, cssizet, + cofft, + cardinal64, (* base types. *) boolean, char, @@ -14951,6 +14966,8 @@ BEGIN word, csizet, cssizet, + cofft, + cardinal64, (* base types. *) char, cardinal, @@ -15089,6 +15106,8 @@ BEGIN word, csizet, cssizet, + cofft, + cardinal64, char, cardinal, longcard, @@ -16318,10 +16337,12 @@ BEGIN address, loc, - byte , - word , - csizet , - cssizet: doNameM2 (p, n) + byte, + word, + csizet, + cssizet, + cofft, + cardinal64: doNameM2 (p, n) END END doSystemM2 ; @@ -18084,6 +18105,8 @@ BEGIN word, csizet, cssizet, + cofft, + cardinal64, (* base types. *) boolean, proc, @@ -18222,6 +18245,8 @@ BEGIN wordN := makeBase (word) ; csizetN := makeBase (csizet) ; cssizetN := makeBase (cssizet) ; + cofftN := makeBase (cofft) ; + cardinal64N := makeBase (cardinal64) ; adrN := makeBase (adr) ; tsizeN := makeBase (tsize) ; @@ -18234,6 +18259,8 @@ BEGIN wordN := addToScope (wordN) ; csizetN := addToScope (csizetN) ; cssizetN := addToScope (cssizetN) ; + cofftN := addToScope (cofftN) ; + cardinal64N := addToScope (cardinal64N) ; adrN := addToScope (adrN) ; tsizeN := addToScope (tsizeN) ; throwN := addToScope (throwN) ; @@ -18247,7 +18274,9 @@ BEGIN addDone (byteN) ; addDone (wordN) ; addDone (csizetN) ; - addDone (cssizetN) + addDone (cssizetN) ; + addDone (cofftN) ; + addDone (cardinal64N) END makeSystem ; diff --git a/gcc/m2/mc/keyc.mod b/gcc/m2/mc/keyc.mod index 24ef6926d287..857dffc6ab0d 100644 --- a/gcc/m2/mc/keyc.mod +++ b/gcc/m2/mc/keyc.mod @@ -264,16 +264,6 @@ BEGIN END useUCharMin ; -(* - useUIntMin - indicate we have used UINT_MIN. -*) - -PROCEDURE useUIntMin ; -BEGIN - seenUIntMin := TRUE -END useUIntMin ; - - (* useIntMax - indicate we have used INT_MAX. *) @@ -334,16 +324,6 @@ BEGIN END useUCharMax ; -(* - useUIntMax - indicate we have used UINT_MAX. -*) - -PROCEDURE useUIntMax ; -BEGIN - seenUIntMax := TRUE -END useUIntMax ; - - (* useSize_t - indicate we have used size_t. *) diff --git a/gcc/m2/pge-boot/GIndexing.h b/gcc/m2/pge-boot/GIndexing.h index bb307ffc860c..4227866039a5 100644 --- a/gcc/m2/pge-boot/GIndexing.h +++ b/gcc/m2/pge-boot/GIndexing.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Indexing_H) # define _Indexing_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/pge-boot/GSEnvironment.h b/gcc/m2/pge-boot/GSEnvironment.h index 01850abfd0f0..8429c3e87d9b 100644 --- a/gcc/m2/pge-boot/GSEnvironment.h +++ b/gcc/m2/pge-boot/GSEnvironment.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_SEnvironment_H) # define _SEnvironment_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/pge-boot/GScan.h b/gcc/m2/pge-boot/GScan.h index d4b901744f7e..04b7490476ed 100644 --- a/gcc/m2/pge-boot/GScan.h +++ b/gcc/m2/pge-boot/GScan.h @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if !defined (_Scan_H) # define _Scan_H +#define INCLUDE_MEMORY #include "config.h" #include "system.h" # ifdef __cplusplus diff --git a/gcc/m2/pge-boot/Glibc.h b/gcc/m2/pge-boot/Glibc.h index 8e68c768db35..ad7deb54d530 100644 --- a/gcc/m2/pge-boot/Glibc.h +++ b/gcc/m2/pge-boot/Glibc.h @@ -203,7 +203,7 @@ EXTERN int libc_creat (void * filename, unsigned int mode); off_t lseek(int fildes, off_t offset, int whence); */ -EXTERN ssize_t libc_lseek (int fd, ssize_t offset, int whence); +EXTERN off_t libc_lseek (int fd, ssize_t offset, int whence); /* perror - writes errno and string. (ARRAY OF CHAR is translated onto ADDRESS). -- GitLab