PR-108135 Modula2 meets clang (remove dead code and bugfix m2.flex)
authorGaius Mulley <gaiusmod2@gmail.com>
Fri, 20 Jan 2023 17:51:52 +0000 (17:51 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Fri, 20 Jan 2023 17:51:52 +0000 (17:51 +0000)
commitf71354f7b99716c47e885851280376574920da92
treeb915d6d7ca04dd0d51b61c76d1c87e915e2cc2c4
parent99ea0d7611605d2d1a67a6021cb78f0bdd5c609b
PR-108135 Modula2 meets clang (remove dead code and bugfix m2.flex)

These patches fix warnings (and a bug) discovered by clang. The
patch set looks longer than the changes as pge and mc needed to be
rebuilt (due to a change in the gcc/m2/gm2-libs/DynamicString.mod
library).

gcc/m2/ChangeLog:

* gm2-gcc/m2statement.cc (gm2_gimplify_function_node):
Remove.
* gm2-libs/DynamicStrings.mod (Equal): Remove dead code.
* m2.flex (<COMMENT>"<*"): Add {} for else statement.
* m2pp.cc (hextree): Add conditional #ifdef DEBUGGING.
* mc-boot/GDynamicStrings.c: Rebuild.
* pge-boot/GDynamicStrings.c: Rebuild.
* pge-boot/GFIO.c: Rebuild.
* pge-boot/GIndexing.c: Rebuild.
* pge-boot/GM2EXCEPTION.c: Rebuild.
* pge-boot/GM2RTS.c: Rebuild.
* pge-boot/GNameKey.c: Rebuild.
* pge-boot/GPushBackInput.c: Rebuild.
* pge-boot/GRTExceptions.c: Rebuild.
* pge-boot/GStdIO.c: Rebuild.
* pge-boot/GSymbolKey.c: Rebuild.
* pge-boot/GSysStorage.c: Rebuild.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
16 files changed:
gcc/m2/gm2-gcc/m2statement.cc
gcc/m2/gm2-libs/DynamicStrings.mod
gcc/m2/m2.flex
gcc/m2/m2pp.cc
gcc/m2/mc-boot/GDynamicStrings.c
gcc/m2/pge-boot/GDynamicStrings.c
gcc/m2/pge-boot/GFIO.c
gcc/m2/pge-boot/GIndexing.c
gcc/m2/pge-boot/GM2EXCEPTION.c
gcc/m2/pge-boot/GM2RTS.c
gcc/m2/pge-boot/GNameKey.c
gcc/m2/pge-boot/GPushBackInput.c
gcc/m2/pge-boot/GRTExceptions.c
gcc/m2/pge-boot/GStdIO.c
gcc/m2/pge-boot/GSymbolKey.c
gcc/m2/pge-boot/GSysStorage.c