]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/m2/gm2-gcc/init.h
[PR modula2/109089] implementation of boolean should be C++/C bool
authorGaius Mulley <gaiusmod2@gmail.com>
Sun, 12 Mar 2023 13:27:23 +0000 (13:27 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Sun, 12 Mar 2023 13:27:23 +0000 (13:27 +0000)
commit431c06691dcbb84c7d999d91202537442e6a60f0
tree78e5bff7771c2fcc12adf318fdc3f456a2dc4baf
parentfa0ecd22f850cf50805380dc626e67a8cb7257d8
[PR modula2/109089] implementation of boolean should be C++/C bool

[PR modula2/109089].  This patch implements BOOLEAN using bool
(boolean_type_node) thoughout cc1gm2.  The patch also includes a
patched version of the bootstrap tool mc.

gcc/ChangeLog:

* doc/gm2.texi (Elementary data types): Equivalence BOOLEAN with
bool.

gcc/m2/ChangeLog:

PR modula2/109089
* gm2-compiler/M2GCCDeclare.mod (DeclareKnownType): Import.
* gm2-gcc/gcc-consolidation.h (stdbool.h): Include.
* gm2-gcc/init.h (defined): Change block start.
* gm2-gcc/m2block.cc: Change FALSE to false, change TRUE to true.
* gm2-gcc/m2block.h: Change int to bool.
* gm2-gcc/m2builtins.cc: Ditto.
* gm2-gcc/m2builtins.h: Ditto.
* gm2-gcc/m2convert.cc: Change FALSE to false, TRUE to true and
int to bool.
* gm2-gcc/m2convert.h: Change int to bool.
* gm2-gcc/m2decl.cc: Change int to bool.
* gm2-gcc/m2decl.h: Change int to bool.
* gm2-gcc/m2expr.cc: Change FALSE to false, TRUE to true and
int to bool.
* gm2-gcc/m2expr.h: Change int to bool.
* gm2-gcc/m2statement.cc: Change FALSE to false, TRUE to true and
int to bool.
* gm2-gcc/m2statement.h: Change int to bool.
* gm2-gcc/m2top.cc: Change int to bool.
* gm2-gcc/m2top.h: Change int to bool.
* gm2-gcc/m2tree.cc: Change int to bool.
* gm2-gcc/m2tree.h: Change int to bool.
* gm2-gcc/m2type.cc: Change int to bool.
* gm2-gcc/m2type.h: Change int to bool.
* gm2-lang.cc (convert_loc): Call convert_to_integer for BOOLEAN_TYPE.
* gm2-libs/Builtins.def (isfinitef): Change return value from
BOOLEAN to INTEGER.
(isfinite): Ditto.
(isfinitel): Ditto.
* gm2-libs/Builtins.mod (isfinitef): Change return value from
BOOLEAN to INTEGER.
(isfinite): Ditto.
(isfinitel): Ditto.
* mc-boot/GASCII.cc: Rebuild.
* mc-boot/GASCII.h: Rebuild.
* mc-boot/GArgs.cc: Rebuild.
* mc-boot/GArgs.h: Rebuild.
* mc-boot/GAssertion.cc: Rebuild.
* mc-boot/GAssertion.h: Rebuild.
* mc-boot/GBreak.cc: Rebuild.
* mc-boot/GBreak.h: Rebuild.
* mc-boot/GCOROUTINES.h: Rebuild.
* mc-boot/GCmdArgs.cc: Rebuild.
* mc-boot/GCmdArgs.h: Rebuild.
* mc-boot/GDebug.cc: Rebuild.
* mc-boot/GDebug.h: Rebuild.
* mc-boot/GDynamicStrings.cc: Rebuild.
* mc-boot/GDynamicStrings.h: Rebuild.
* mc-boot/GEnvironment.cc: Rebuild.
* mc-boot/GEnvironment.h: Rebuild.
* mc-boot/GFIO.cc: Rebuild.
* mc-boot/GFIO.h: Rebuild.
* mc-boot/GFormatStrings.cc: Rebuild.
* mc-boot/GFormatStrings.h: Rebuild.
* mc-boot/GFpuIO.cc: Rebuild.
* mc-boot/GFpuIO.h: Rebuild.
* mc-boot/GIO.cc: Rebuild.
* mc-boot/GIO.h: Rebuild.
* mc-boot/GIndexing.cc: Rebuild.
* mc-boot/GIndexing.h: Rebuild.
* mc-boot/GM2Dependent.cc: Rebuild.
* mc-boot/GM2Dependent.h: Rebuild.
* mc-boot/GM2EXCEPTION.cc: Rebuild.
* mc-boot/GM2EXCEPTION.h: Rebuild.
* mc-boot/GM2LINK.h: Rebuild.
* mc-boot/GM2RTS.cc: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GMemUtils.cc: Rebuild.
* mc-boot/GMemUtils.h: Rebuild.
* mc-boot/GNumberIO.cc: Rebuild.
* mc-boot/GNumberIO.h: Rebuild.
* mc-boot/GPushBackInput.cc: Rebuild.
* mc-boot/GPushBackInput.h: Rebuild.
* mc-boot/GRTExceptions.cc: Rebuild.
* mc-boot/GRTExceptions.h: Rebuild.
* mc-boot/GRTco.h: Rebuild.
* mc-boot/GRTentity.h: Rebuild.
* mc-boot/GRTint.cc: Rebuild.
* mc-boot/GRTint.h: Rebuild.
* mc-boot/GSArgs.cc: Rebuild.
* mc-boot/GSArgs.h: Rebuild.
* mc-boot/GSFIO.cc: Rebuild.
* mc-boot/GSFIO.h: Rebuild.
* mc-boot/GSYSTEM.h: Rebuild.
* mc-boot/GSelective.h: Rebuild.
* mc-boot/GStdIO.cc: Rebuild.
* mc-boot/GStdIO.h: Rebuild.
* mc-boot/GStorage.cc: Rebuild.
* mc-boot/GStorage.h: Rebuild.
* mc-boot/GStrCase.cc: Rebuild.
* mc-boot/GStrCase.h: Rebuild.
* mc-boot/GStrIO.cc: Rebuild.
* mc-boot/GStrIO.h: Rebuild.
* mc-boot/GStrLib.cc: Rebuild.
* mc-boot/GStrLib.h: Rebuild.
* mc-boot/GStringConvert.cc: Rebuild.
* mc-boot/GStringConvert.h: Rebuild.
* mc-boot/GSysExceptions.h: Rebuild.
* mc-boot/GSysStorage.cc: Rebuild.
* mc-boot/GSysStorage.h: Rebuild.
* mc-boot/GTimeString.cc: Rebuild.
* mc-boot/GTimeString.h: Rebuild.
* mc-boot/GUnixArgs.h: Rebuild.
* mc-boot/Galists.cc: Rebuild.
* mc-boot/Galists.h: Rebuild.
* mc-boot/Gdecl.cc: Rebuild.
* mc-boot/Gdecl.h: Rebuild.
* mc-boot/Gdtoa.h: Rebuild.
* mc-boot/Gerrno.h: Rebuild.
* mc-boot/Gkeyc.cc: Rebuild.
* mc-boot/Gkeyc.h: Rebuild.
* mc-boot/Gldtoa.h: Rebuild.
* mc-boot/Glibc.h: Rebuild.
* mc-boot/Glibm.h: Rebuild.
* mc-boot/Glists.cc: Rebuild.
* mc-boot/Glists.h: Rebuild.
* mc-boot/GmcComment.cc: Rebuild.
* mc-boot/GmcComment.h: Rebuild.
* mc-boot/GmcComp.cc: Rebuild.
* mc-boot/GmcComp.h: Rebuild.
* mc-boot/GmcDebug.cc: Rebuild.
* mc-boot/GmcDebug.h: Rebuild.
* mc-boot/GmcError.cc: Rebuild.
* mc-boot/GmcError.h: Rebuild.
* mc-boot/GmcFileName.cc: Rebuild.
* mc-boot/GmcFileName.h: Rebuild.
* mc-boot/GmcLexBuf.cc: Rebuild.
* mc-boot/GmcLexBuf.h: Rebuild.
* mc-boot/GmcMetaError.cc: Rebuild.
* mc-boot/GmcMetaError.h: Rebuild.
* mc-boot/GmcOptions.cc: Rebuild.
* mc-boot/GmcOptions.h: Rebuild.
* mc-boot/GmcPreprocess.cc: Rebuild.
* mc-boot/GmcPreprocess.h: Rebuild.
* mc-boot/GmcPretty.cc: Rebuild.
* mc-boot/GmcPretty.h: Rebuild.
* mc-boot/GmcPrintf.cc: Rebuild.
* mc-boot/GmcPrintf.h: Rebuild.
* mc-boot/GmcQuiet.cc: Rebuild.
* mc-boot/GmcQuiet.h: Rebuild.
* mc-boot/GmcReserved.cc: Rebuild.
* mc-boot/GmcReserved.h: Rebuild.
* mc-boot/GmcSearch.cc: Rebuild.
* mc-boot/GmcSearch.h: Rebuild.
* mc-boot/GmcStack.cc: Rebuild.
* mc-boot/GmcStack.h: Rebuild.
* mc-boot/GmcStream.cc: Rebuild.
* mc-boot/GmcStream.h: Rebuild.
* mc-boot/Gmcflex.h: Rebuild.
* mc-boot/Gmcp1.cc: Rebuild.
* mc-boot/Gmcp1.h: Rebuild.
* mc-boot/Gmcp2.cc: Rebuild.
* mc-boot/Gmcp2.h: Rebuild.
* mc-boot/Gmcp3.cc: Rebuild.
* mc-boot/Gmcp3.h: Rebuild.
* mc-boot/Gmcp4.cc: Rebuild.
* mc-boot/Gmcp4.h: Rebuild.
* mc-boot/Gmcp5.cc: Rebuild.
* mc-boot/Gmcp5.h: Rebuild.
* mc-boot/GnameKey.cc: Rebuild.
* mc-boot/GnameKey.h: Rebuild.
* mc-boot/GsymbolKey.cc: Rebuild.
* mc-boot/GsymbolKey.h: Rebuild.
* mc-boot/Gtermios.h: Rebuild.
* mc-boot/Gtop.cc: Rebuild.
* mc-boot/Gvarargs.cc: Rebuild.
* mc-boot/Gvarargs.h: Rebuild.
* mc-boot/Gwlists.cc: Rebuild.
* mc-boot/Gwlists.h: Rebuild.
* mc-boot/Gwrapc.h: Rebuild.
* mc/decl.mod (doBoolC): New procedure.
(doBaseC): Call doBoolC.
* mc/keyc.mod: Import useBool.
(genBool): New procedure.
(genDefs): Call genBool.
* mc/mcOptions.def (useBool): New procedure.
* mc/mcOptions.mod (useBool): New procedure.
(useBoolType): New variable.
(optionIs): Assign useBoolType to TRUE.

gcc/testsuite/ChangeLog:

PR modula2/109089
* gm2/pimlib/run/pass/limittests.mod: Rewritten to reflect
the external definitions of isfinite.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
167 files changed:
gcc/doc/gm2.texi
gcc/m2/gm2-compiler/M2GCCDeclare.mod
gcc/m2/gm2-gcc/gcc-consolidation.h
gcc/m2/gm2-gcc/init.h
gcc/m2/gm2-gcc/m2block.cc
gcc/m2/gm2-gcc/m2block.h
gcc/m2/gm2-gcc/m2builtins.cc
gcc/m2/gm2-gcc/m2builtins.h
gcc/m2/gm2-gcc/m2convert.cc
gcc/m2/gm2-gcc/m2convert.h
gcc/m2/gm2-gcc/m2decl.cc
gcc/m2/gm2-gcc/m2decl.h
gcc/m2/gm2-gcc/m2expr.cc
gcc/m2/gm2-gcc/m2expr.h
gcc/m2/gm2-gcc/m2statement.cc
gcc/m2/gm2-gcc/m2statement.h
gcc/m2/gm2-gcc/m2top.cc
gcc/m2/gm2-gcc/m2top.h
gcc/m2/gm2-gcc/m2tree.cc
gcc/m2/gm2-gcc/m2tree.h
gcc/m2/gm2-gcc/m2type.cc
gcc/m2/gm2-gcc/m2type.h
gcc/m2/gm2-lang.cc
gcc/m2/gm2-libs/Builtins.def
gcc/m2/gm2-libs/Builtins.mod
gcc/m2/mc-boot/GASCII.cc
gcc/m2/mc-boot/GASCII.h
gcc/m2/mc-boot/GArgs.cc
gcc/m2/mc-boot/GArgs.h
gcc/m2/mc-boot/GAssertion.cc
gcc/m2/mc-boot/GAssertion.h
gcc/m2/mc-boot/GBreak.cc
gcc/m2/mc-boot/GBreak.h
gcc/m2/mc-boot/GCOROUTINES.h
gcc/m2/mc-boot/GCmdArgs.cc
gcc/m2/mc-boot/GCmdArgs.h
gcc/m2/mc-boot/GDebug.cc
gcc/m2/mc-boot/GDebug.h
gcc/m2/mc-boot/GDynamicStrings.cc
gcc/m2/mc-boot/GDynamicStrings.h
gcc/m2/mc-boot/GEnvironment.cc
gcc/m2/mc-boot/GEnvironment.h
gcc/m2/mc-boot/GFIO.cc
gcc/m2/mc-boot/GFIO.h
gcc/m2/mc-boot/GFormatStrings.cc
gcc/m2/mc-boot/GFormatStrings.h
gcc/m2/mc-boot/GFpuIO.cc
gcc/m2/mc-boot/GFpuIO.h
gcc/m2/mc-boot/GIO.cc
gcc/m2/mc-boot/GIO.h
gcc/m2/mc-boot/GIndexing.cc
gcc/m2/mc-boot/GIndexing.h
gcc/m2/mc-boot/GM2Dependent.cc
gcc/m2/mc-boot/GM2Dependent.h
gcc/m2/mc-boot/GM2EXCEPTION.cc
gcc/m2/mc-boot/GM2EXCEPTION.h
gcc/m2/mc-boot/GM2LINK.h
gcc/m2/mc-boot/GM2RTS.cc
gcc/m2/mc-boot/GM2RTS.h
gcc/m2/mc-boot/GMemUtils.cc
gcc/m2/mc-boot/GMemUtils.h
gcc/m2/mc-boot/GNumberIO.cc
gcc/m2/mc-boot/GNumberIO.h
gcc/m2/mc-boot/GPushBackInput.cc
gcc/m2/mc-boot/GPushBackInput.h
gcc/m2/mc-boot/GRTExceptions.cc
gcc/m2/mc-boot/GRTExceptions.h
gcc/m2/mc-boot/GRTco.h
gcc/m2/mc-boot/GRTentity.h
gcc/m2/mc-boot/GRTint.cc
gcc/m2/mc-boot/GRTint.h
gcc/m2/mc-boot/GSArgs.cc
gcc/m2/mc-boot/GSArgs.h
gcc/m2/mc-boot/GSFIO.cc
gcc/m2/mc-boot/GSFIO.h
gcc/m2/mc-boot/GSYSTEM.h
gcc/m2/mc-boot/GSelective.h
gcc/m2/mc-boot/GStdIO.cc
gcc/m2/mc-boot/GStdIO.h
gcc/m2/mc-boot/GStorage.cc
gcc/m2/mc-boot/GStorage.h
gcc/m2/mc-boot/GStrCase.cc
gcc/m2/mc-boot/GStrCase.h
gcc/m2/mc-boot/GStrIO.cc
gcc/m2/mc-boot/GStrIO.h
gcc/m2/mc-boot/GStrLib.cc
gcc/m2/mc-boot/GStrLib.h
gcc/m2/mc-boot/GStringConvert.cc
gcc/m2/mc-boot/GStringConvert.h
gcc/m2/mc-boot/GSysExceptions.h
gcc/m2/mc-boot/GSysStorage.cc
gcc/m2/mc-boot/GSysStorage.h
gcc/m2/mc-boot/GTimeString.cc
gcc/m2/mc-boot/GTimeString.h
gcc/m2/mc-boot/GUnixArgs.h
gcc/m2/mc-boot/Galists.cc
gcc/m2/mc-boot/Galists.h
gcc/m2/mc-boot/Gdecl.cc
gcc/m2/mc-boot/Gdecl.h
gcc/m2/mc-boot/Gdtoa.h
gcc/m2/mc-boot/Gerrno.h
gcc/m2/mc-boot/Gkeyc.cc
gcc/m2/mc-boot/Gkeyc.h
gcc/m2/mc-boot/Gldtoa.h
gcc/m2/mc-boot/Glibc.h
gcc/m2/mc-boot/Glibm.h
gcc/m2/mc-boot/Glists.cc
gcc/m2/mc-boot/Glists.h
gcc/m2/mc-boot/GmcComment.cc
gcc/m2/mc-boot/GmcComment.h
gcc/m2/mc-boot/GmcComp.cc
gcc/m2/mc-boot/GmcComp.h
gcc/m2/mc-boot/GmcDebug.cc
gcc/m2/mc-boot/GmcDebug.h
gcc/m2/mc-boot/GmcError.cc
gcc/m2/mc-boot/GmcError.h
gcc/m2/mc-boot/GmcFileName.cc
gcc/m2/mc-boot/GmcFileName.h
gcc/m2/mc-boot/GmcLexBuf.cc
gcc/m2/mc-boot/GmcLexBuf.h
gcc/m2/mc-boot/GmcMetaError.cc
gcc/m2/mc-boot/GmcMetaError.h
gcc/m2/mc-boot/GmcOptions.cc
gcc/m2/mc-boot/GmcOptions.h
gcc/m2/mc-boot/GmcPreprocess.cc
gcc/m2/mc-boot/GmcPreprocess.h
gcc/m2/mc-boot/GmcPretty.cc
gcc/m2/mc-boot/GmcPretty.h
gcc/m2/mc-boot/GmcPrintf.cc
gcc/m2/mc-boot/GmcPrintf.h
gcc/m2/mc-boot/GmcQuiet.cc
gcc/m2/mc-boot/GmcQuiet.h
gcc/m2/mc-boot/GmcReserved.cc
gcc/m2/mc-boot/GmcReserved.h
gcc/m2/mc-boot/GmcSearch.cc
gcc/m2/mc-boot/GmcSearch.h
gcc/m2/mc-boot/GmcStack.cc
gcc/m2/mc-boot/GmcStack.h
gcc/m2/mc-boot/GmcStream.cc
gcc/m2/mc-boot/GmcStream.h
gcc/m2/mc-boot/Gmcflex.h
gcc/m2/mc-boot/Gmcp1.cc
gcc/m2/mc-boot/Gmcp1.h
gcc/m2/mc-boot/Gmcp2.cc
gcc/m2/mc-boot/Gmcp2.h
gcc/m2/mc-boot/Gmcp3.cc
gcc/m2/mc-boot/Gmcp3.h
gcc/m2/mc-boot/Gmcp4.cc
gcc/m2/mc-boot/Gmcp4.h
gcc/m2/mc-boot/Gmcp5.cc
gcc/m2/mc-boot/Gmcp5.h
gcc/m2/mc-boot/GnameKey.cc
gcc/m2/mc-boot/GnameKey.h
gcc/m2/mc-boot/GsymbolKey.cc
gcc/m2/mc-boot/GsymbolKey.h
gcc/m2/mc-boot/Gtermios.h
gcc/m2/mc-boot/Gtop.cc
gcc/m2/mc-boot/Gvarargs.cc
gcc/m2/mc-boot/Gvarargs.h
gcc/m2/mc-boot/Gwlists.cc
gcc/m2/mc-boot/Gwlists.h
gcc/m2/mc-boot/Gwrapc.h
gcc/m2/mc/decl.mod
gcc/m2/mc/keyc.mod
gcc/m2/mc/mcOptions.def
gcc/m2/mc/mcOptions.mod
gcc/testsuite/gm2/pimlib/run/pass/limittests.mod