public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms
@ 2023-04-29 1:19 gr.audio at gmail dot com
2023-05-02 12:34 ` [Bug modula2/109675] " gaius at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gr.audio at gmail dot com @ 2023-04-29 1:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109675
Bug ID: 109675
Summary: GCC 13.1: the Modula-2 front-end fails to build on
some platforms
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: gr.audio at gmail dot com
Target Milestone: ---
Happens on any platform on which the 'long unsigned int' type can't hold
a pointer (for instance: Windows/mingw64).
The culprit is this:
../../gcc-13.1.0/gcc/m2/mc-boot/GDynamicStrings.cc: In function 'void
writeAddress(void*)':
../../gcc-13.1.0/gcc/m2/mc-boot/GDynamicStrings.cc:909:18: error: cast from
'void*' to 'long unsigned int' loses precision [-fpermissive]
909 | writeLongcard ((long unsigned int ) (a));
| ^~~~~~~~~~~~~~~~~~~~~~~~
Casting a pointer to a 'long unsigned int' is not exactly portable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/109675] GCC 13.1: the Modula-2 front-end fails to build on some platforms
2023-04-29 1:19 [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms gr.audio at gmail dot com
@ 2023-05-02 12:34 ` gaius at gcc dot gnu.org
2023-05-03 15:09 ` gaius at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-05-02 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109675
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-05-02
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Yes indeed writeAddress needs to be re-written.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/109675] GCC 13.1: the Modula-2 front-end fails to build on some platforms
2023-04-29 1:19 [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms gr.audio at gmail dot com
2023-05-02 12:34 ` [Bug modula2/109675] " gaius at gcc dot gnu.org
@ 2023-05-03 15:09 ` gaius at gcc dot gnu.org
2023-05-04 0:37 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-05-03 15:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109675
--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54981
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54981&action=edit
Proposed fix
Here is a proposed patch, writeAddress is re-implemented and as a result the
support tools mc and pge have been rebuilt. I'm currently bootstrapping on
multiple targets - once complete and if no problems develop the patch will be
applied. Thanks for the bug report!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/109675] GCC 13.1: the Modula-2 front-end fails to build on some platforms
2023-04-29 1:19 [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms gr.audio at gmail dot com
2023-05-02 12:34 ` [Bug modula2/109675] " gaius at gcc dot gnu.org
2023-05-03 15:09 ` gaius at gcc dot gnu.org
@ 2023-05-04 0:37 ` cvs-commit at gcc dot gnu.org
2023-05-04 0:42 ` gaius at gcc dot gnu.org
2023-07-28 11:56 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-04 0:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109675
--- Comment #3 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:9525daf0fbc5c836ee028f5b58612857de7da51d
commit r14-465-g9525daf0fbc5c836ee028f5b58612857de7da51d
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date: Thu May 4 01:37:05 2023 +0100
PR modula2/109675 implementation of writeAddress is non portable
The implementation of gcc/m2/gm2-libs/DynamicStrings.mod:writeAddress
is non portable as it casts a void * into an unsigned long int. This
procedure has been re-implemented to use snprintf. As it is a library
the support tools 'mc' and 'pge' have been rebuilt. There have been
linking changes in the library and the underlying boolean type is now
bool since the last rebuild hence the size of the patch.
gcc/m2/ChangeLog:
PR modula2/109675
* Make-lang.in (MC-LIB-DEFS): Remove M2LINK.def.
(BUILD-PGE-O): Remove GM2LINK.o.
* Make-maintainer.in (PPG-DEFS): New define.
(PPG-LIB-DEFS): Remove M2LINK.def.
(BUILD-BOOT-PPG-H): Add PPGDEF .h files.
(m2/ppg$(exeext)): Remove M2LINK.o
(PGE-DEPS): New define.
(m2/pg$(exeext)): Remove M2LINK.o.
(m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Add -Im2/gm2-pge-boot.
(m2/pge$(exeext)): Remove M2LINK.o.
(pge-maintainer): Re-implement.
(pge-libs-push): Re-implement.
(m2/m2obj3/cc1gm2$(exeext)): Remove M2LINK.o.
* gm2-libs/DynamicStrings.mod (writeAddress): Re-implement
using snprintf.
* gm2-libs/M2Dependent.mod: Remove commented out imports.
* mc-boot/GDynamicStrings.cc: Rebuild.
* mc-boot/GFIO.cc: Rebuild.
* mc-boot/GFormatStrings.cc: Rebuild.
* mc-boot/GM2Dependent.cc: Rebuild.
* mc-boot/GM2Dependent.h: Rebuild.
* mc-boot/GM2RTS.cc: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GRTExceptions.cc: Rebuild.
* mc-boot/GRTint.cc: Rebuild.
* mc-boot/GSFIO.cc: Rebuild.
* mc-boot/GStringConvert.cc: Rebuild.
* mc-boot/Gdecl.cc: Rebuild.
* pge-boot/GASCII.cc: Rebuild.
* pge-boot/GASCII.h: Rebuild.
* pge-boot/GArgs.cc: Rebuild.
* pge-boot/GArgs.h: Rebuild.
* pge-boot/GAssertion.cc: Rebuild.
* pge-boot/GAssertion.h: Rebuild.
* pge-boot/GBreak.h: Rebuild.
* pge-boot/GCmdArgs.h: Rebuild.
* pge-boot/GDebug.cc: Rebuild.
* pge-boot/GDebug.h: Rebuild.
* pge-boot/GDynamicStrings.cc: Rebuild.
* pge-boot/GDynamicStrings.h: Rebuild.
* pge-boot/GEnvironment.h: Rebuild.
* pge-boot/GFIO.cc: Rebuild.
* pge-boot/GFIO.h: Rebuild.
* pge-boot/GFormatStrings.h:: Rebuild.
* pge-boot/GFpuIO.h:: Rebuild.
* pge-boot/GIO.cc: Rebuild.
* pge-boot/GIO.h: Rebuild.
* pge-boot/GIndexing.cc: Rebuild.
* pge-boot/GIndexing.h: Rebuild.
* pge-boot/GLists.cc: Rebuild.
* pge-boot/GLists.h: Rebuild.
* pge-boot/GM2Dependent.cc: Rebuild.
* pge-boot/GM2Dependent.h: Rebuild.
* pge-boot/GM2EXCEPTION.cc: Rebuild.
* pge-boot/GM2EXCEPTION.h: Rebuild.
* pge-boot/GM2RTS.cc: Rebuild.
* pge-boot/GM2RTS.h: Rebuild.
* pge-boot/GNameKey.cc: Rebuild.
* pge-boot/GNameKey.h: Rebuild.
* pge-boot/GNumberIO.cc: Rebuild.
* pge-boot/GNumberIO.h: Rebuild.
* pge-boot/GOutput.cc: Rebuild.
* pge-boot/GOutput.h: Rebuild.
* pge-boot/GPushBackInput.cc: Rebuild.
* pge-boot/GPushBackInput.h: Rebuild.
* pge-boot/GRTExceptions.cc: Rebuild.
* pge-boot/GRTExceptions.h: Rebuild.
* pge-boot/GSArgs.h: Rebuild.
* pge-boot/GSEnvironment.h: Rebuild.
* pge-boot/GSFIO.cc: Rebuild.
* pge-boot/GSFIO.h: Rebuild.
* pge-boot/GSYSTEM.h: Rebuild.
* pge-boot/GScan.h: Rebuild.
* pge-boot/GStdIO.cc: Rebuild.
* pge-boot/GStdIO.h: Rebuild.
* pge-boot/GStorage.cc: Rebuild.
* pge-boot/GStorage.h: Rebuild.
* pge-boot/GStrCase.cc: Rebuild.
* pge-boot/GStrCase.h: Rebuild.
* pge-boot/GStrIO.cc: Rebuild.
* pge-boot/GStrIO.h: Rebuild.
* pge-boot/GStrLib.cc: Rebuild.
* pge-boot/GStrLib.h: Rebuild.
* pge-boot/GStringConvert.h: Rebuild.
* pge-boot/GSymbolKey.cc: Rebuild.
* pge-boot/GSymbolKey.h: Rebuild.
* pge-boot/GSysExceptions.h: Rebuild.
* pge-boot/GSysStorage.cc: Rebuild.
* pge-boot/GSysStorage.h: Rebuild.
* pge-boot/GTimeString.h: Rebuild.
* pge-boot/GUnixArgs.h: Rebuild.
* pge-boot/Gbnflex.cc: Rebuild.
* pge-boot/Gbnflex.h: Rebuild.
* pge-boot/Gdtoa.h: Rebuild.
* pge-boot/Gerrno.h: Rebuild.
* pge-boot/Gldtoa.h: Rebuild.
* pge-boot/Glibc.h: Rebuild.
* pge-boot/Glibm.h: Rebuild.
* pge-boot/Gpge.cc: Rebuild.
* pge-boot/Gtermios.h: Rebuild.
* pge-boot/Gwrapc.h: Rebuild.
* mc-boot/GM2LINK.h: Removed.
* pge-boot/GM2LINK.cc: Removed.
* pge-boot/GM2LINK.h: Removed.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/109675] GCC 13.1: the Modula-2 front-end fails to build on some platforms
2023-04-29 1:19 [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms gr.audio at gmail dot com
` (2 preceding siblings ...)
2023-05-04 0:37 ` cvs-commit at gcc dot gnu.org
@ 2023-05-04 0:42 ` gaius at gcc dot gnu.org
2023-07-28 11:56 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-05-04 0:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109675
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the bug report - closing now that the patch has been applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/109675] GCC 13.1: the Modula-2 front-end fails to build on some platforms
2023-04-29 1:19 [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms gr.audio at gmail dot com
` (3 preceding siblings ...)
2023-05-04 0:42 ` gaius at gcc dot gnu.org
@ 2023-07-28 11:56 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-28 11:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109675
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Gaius Mulley
<gaius@gcc.gnu.org>:
https://gcc.gnu.org/g:542cba5b5d9d8aae94e3143df7a8cb4714373691
commit r13-7620-g542cba5b5d9d8aae94e3143df7a8cb4714373691
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date: Fri Jul 28 12:55:12 2023 +0100
PR modula2/109675 implementation of writeAddress is non portable
The implementation of gcc/m2/gm2-libs/DynamicStrings.mod:writeAddress
is non portable as it casts a void * into an unsigned long int. This
procedure has been re-implemented to use snprintf. As it is a library
the support tools 'mc' and 'pge' have been rebuilt. There have been
linking changes in the library and the underlying boolean type is now
bool since the last rebuild hence the size of the patch.
gcc/m2/ChangeLog:
PR modula2/109675
* Make-lang.in (MC-LIB-DEFS): Remove M2LINK.def.
(BUILD-PGE-O): Remove GM2LINK.o.
* Make-maintainer.in (PPG-DEFS): New define.
(PPG-LIB-DEFS): Remove M2LINK.def.
(BUILD-BOOT-PPG-H): Add PPGDEF .h files.
(m2/ppg$(exeext)): Remove M2LINK.o
(PGE-DEPS): New define.
(m2/pg$(exeext)): Remove M2LINK.o.
(m2/gm2-pge-boot/$(SRC_PREFIX)%.o): Add -Im2/gm2-pge-boot.
(m2/pge$(exeext)): Remove M2LINK.o.
(pge-maintainer): Re-implement.
(pge-libs-push): Re-implement.
(m2/m2obj3/cc1gm2$(exeext)): Remove M2LINK.o.
* gm2-libs/DynamicStrings.mod (writeAddress): Re-implement
using snprintf.
* gm2-libs/M2Dependent.mod: Remove commented out imports.
* mc-boot/GDynamicStrings.cc: Rebuild.
* mc-boot/GFIO.cc: Rebuild.
* mc-boot/GFormatStrings.cc: Rebuild.
* mc-boot/GM2Dependent.cc: Rebuild.
* mc-boot/GM2Dependent.h: Rebuild.
* mc-boot/GM2RTS.cc: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GRTExceptions.cc: Rebuild.
* mc-boot/GRTint.cc: Rebuild.
* mc-boot/GSFIO.cc: Rebuild.
* mc-boot/GStringConvert.cc: Rebuild.
* mc-boot/Gdecl.cc: Rebuild.
* pge-boot/GASCII.cc: Rebuild.
* pge-boot/GASCII.h: Rebuild.
* pge-boot/GArgs.cc: Rebuild.
* pge-boot/GArgs.h: Rebuild.
* pge-boot/GAssertion.cc: Rebuild.
* pge-boot/GAssertion.h: Rebuild.
* pge-boot/GBreak.h: Rebuild.
* pge-boot/GCmdArgs.h: Rebuild.
* pge-boot/GDebug.cc: Rebuild.
* pge-boot/GDebug.h: Rebuild.
* pge-boot/GDynamicStrings.cc: Rebuild.
* pge-boot/GDynamicStrings.h: Rebuild.
* pge-boot/GEnvironment.h: Rebuild.
* pge-boot/GFIO.cc: Rebuild.
* pge-boot/GFIO.h: Rebuild.
* pge-boot/GFormatStrings.h:: Rebuild.
* pge-boot/GFpuIO.h:: Rebuild.
* pge-boot/GIO.cc: Rebuild.
* pge-boot/GIO.h: Rebuild.
* pge-boot/GIndexing.cc: Rebuild.
* pge-boot/GIndexing.h: Rebuild.
* pge-boot/GLists.cc: Rebuild.
* pge-boot/GLists.h: Rebuild.
* pge-boot/GM2Dependent.cc: Rebuild.
* pge-boot/GM2Dependent.h: Rebuild.
* pge-boot/GM2EXCEPTION.cc: Rebuild.
* pge-boot/GM2EXCEPTION.h: Rebuild.
* pge-boot/GM2RTS.cc: Rebuild.
* pge-boot/GM2RTS.h: Rebuild.
* pge-boot/GNameKey.cc: Rebuild.
* pge-boot/GNameKey.h: Rebuild.
* pge-boot/GNumberIO.cc: Rebuild.
* pge-boot/GNumberIO.h: Rebuild.
* pge-boot/GOutput.cc: Rebuild.
* pge-boot/GOutput.h: Rebuild.
* pge-boot/GPushBackInput.cc: Rebuild.
* pge-boot/GPushBackInput.h: Rebuild.
* pge-boot/GRTExceptions.cc: Rebuild.
* pge-boot/GRTExceptions.h: Rebuild.
* pge-boot/GSArgs.h: Rebuild.
* pge-boot/GSEnvironment.h: Rebuild.
* pge-boot/GSFIO.cc: Rebuild.
* pge-boot/GSFIO.h: Rebuild.
* pge-boot/GSYSTEM.h: Rebuild.
* pge-boot/GScan.h: Rebuild.
* pge-boot/GStdIO.cc: Rebuild.
* pge-boot/GStdIO.h: Rebuild.
* pge-boot/GStorage.cc: Rebuild.
* pge-boot/GStorage.h: Rebuild.
* pge-boot/GStrCase.cc: Rebuild.
* pge-boot/GStrCase.h: Rebuild.
* pge-boot/GStrIO.cc: Rebuild.
* pge-boot/GStrIO.h: Rebuild.
* pge-boot/GStrLib.cc: Rebuild.
* pge-boot/GStrLib.h: Rebuild.
* pge-boot/GStringConvert.h: Rebuild.
* pge-boot/GSymbolKey.cc: Rebuild.
* pge-boot/GSymbolKey.h: Rebuild.
* pge-boot/GSysExceptions.h: Rebuild.
* pge-boot/GSysStorage.cc: Rebuild.
* pge-boot/GSysStorage.h: Rebuild.
* pge-boot/GTimeString.h: Rebuild.
* pge-boot/GUnixArgs.h: Rebuild.
* pge-boot/Gbnflex.cc: Rebuild.
* pge-boot/Gbnflex.h: Rebuild.
* pge-boot/Gdtoa.h: Rebuild.
* pge-boot/Gerrno.h: Rebuild.
* pge-boot/Gldtoa.h: Rebuild.
* pge-boot/Glibc.h: Rebuild.
* pge-boot/Glibm.h: Rebuild.
* pge-boot/Gpge.cc: Rebuild.
* pge-boot/Gtermios.h: Rebuild.
* pge-boot/Gwrapc.h: Rebuild.
* mc-boot/GM2LINK.h: Removed.
* pge-boot/GM2LINK.cc: Removed.
* pge-boot/GM2LINK.h: Removed.
(cherry picked from commit 9525daf0fbc5c836ee028f5b58612857de7da51d)
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-28 11:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-29 1:19 [Bug modula2/109675] New: GCC 13.1: the Modula-2 front-end fails to build on some platforms gr.audio at gmail dot com
2023-05-02 12:34 ` [Bug modula2/109675] " gaius at gcc dot gnu.org
2023-05-03 15:09 ` gaius at gcc dot gnu.org
2023-05-04 0:37 ` cvs-commit at gcc dot gnu.org
2023-05-04 0:42 ` gaius at gcc dot gnu.org
2023-07-28 11:56 ` cvs-commit 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).