public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/109089] New: implementation of boolean should be C++/C bool rather than int
@ 2023-03-10 12:28 gaius at gcc dot gnu.org
  2023-03-10 12:28 ` [Bug modula2/109089] " gaius at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-10 12:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109089

            Bug ID: 109089
           Summary: implementation of boolean should be C++/C bool rather
                    than int
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: gaius at gcc dot gnu.org
  Target Milestone: ---

Given gcc has stdbool available it might be beneficial to implement the
modula-2 boolean data type as a C/C++ bool (using boolean_type_node).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/109089] implementation of boolean should be C++/C bool rather than int
  2023-03-10 12:28 [Bug modula2/109089] New: implementation of boolean should be C++/C bool rather than int gaius at gcc dot gnu.org
@ 2023-03-10 12:28 ` gaius at gcc dot gnu.org
  2023-03-10 13:13 ` gaius at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-10 12:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109089

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-03-10
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/109089] implementation of boolean should be C++/C bool rather than int
  2023-03-10 12:28 [Bug modula2/109089] New: implementation of boolean should be C++/C bool rather than int gaius at gcc dot gnu.org
  2023-03-10 12:28 ` [Bug modula2/109089] " gaius at gcc dot gnu.org
@ 2023-03-10 13:13 ` gaius at gcc dot gnu.org
  2023-03-12 13:27 ` cvs-commit at gcc dot gnu.org
  2023-03-12 13:29 ` gaius at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-10 13:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109089

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54634
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54634&action=edit
Proposed fix

Here is the proposed patch which has been bootstrapped on ppc64le, x86_64,
armv7l, aarch64, debian x86_64 and suse x86_64.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/109089] implementation of boolean should be C++/C bool rather than int
  2023-03-10 12:28 [Bug modula2/109089] New: implementation of boolean should be C++/C bool rather than int gaius at gcc dot gnu.org
  2023-03-10 12:28 ` [Bug modula2/109089] " gaius at gcc dot gnu.org
  2023-03-10 13:13 ` gaius at gcc dot gnu.org
@ 2023-03-12 13:27 ` cvs-commit at gcc dot gnu.org
  2023-03-12 13:29 ` gaius at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-12 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109089

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:431c06691dcbb84c7d999d91202537442e6a60f0

commit r13-6614-g431c06691dcbb84c7d999d91202537442e6a60f0
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Sun Mar 12 13:27:23 2023 +0000

    [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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/109089] implementation of boolean should be C++/C bool rather than int
  2023-03-10 12:28 [Bug modula2/109089] New: implementation of boolean should be C++/C bool rather than int gaius at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-03-12 13:27 ` cvs-commit at gcc dot gnu.org
@ 2023-03-12 13:29 ` gaius at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-03-12 13:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109089

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing after applying patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-12 13:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 12:28 [Bug modula2/109089] New: implementation of boolean should be C++/C bool rather than int gaius at gcc dot gnu.org
2023-03-10 12:28 ` [Bug modula2/109089] " gaius at gcc dot gnu.org
2023-03-10 13:13 ` gaius at gcc dot gnu.org
2023-03-12 13:27 ` cvs-commit at gcc dot gnu.org
2023-03-12 13:29 ` gaius at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).