aboutsummaryrefslogtreecommitdiff
path: root/gcc/m2/gm2-gcc
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-01-20 17:51:52 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-01-20 17:51:52 +0000
commitf71354f7b99716c47e885851280376574920da92 (patch)
treeb915d6d7ca04dd0d51b61c76d1c87e915e2cc2c4 /gcc/m2/gm2-gcc
parent99ea0d7611605d2d1a67a6021cb78f0bdd5c609b (diff)
downloadgcc-f71354f7b99716c47e885851280376574920da92.zip
gcc-f71354f7b99716c47e885851280376574920da92.tar.gz
gcc-f71354f7b99716c47e885851280376574920da92.tar.bz2
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>
Diffstat (limited to 'gcc/m2/gm2-gcc')
-rw-r--r--gcc/m2/gm2-gcc/m2statement.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/gcc/m2/gm2-gcc/m2statement.cc b/gcc/m2/gm2-gcc/m2statement.cc
index 74956da..c3307db 100644
--- a/gcc/m2/gm2-gcc/m2statement.cc
+++ b/gcc/m2/gm2-gcc/m2statement.cc
@@ -84,23 +84,6 @@ m2statement_BuildStartFunctionCode (location_t location, tree fndecl,
DECL_DECLARED_INLINE_P (fndecl) = 0; /* isinline; */
}
-static void
-gm2_gimplify_function_node (tree fndecl)
-{
- /* Convert all nested functions to GIMPLE now. We do things in this
- order so that items like VLA sizes are expanded properly in the
- context of the correct function. */
- struct cgraph_node *cgn;
-
- dump_function (TDI_original, fndecl);
- gimplify_function_tree (fndecl);
-
- cgn = cgraph_node::get_create (fndecl);
- for (cgn = first_nested_function (cgn);
- cgn != NULL; cgn = next_nested_function (cgn))
- gm2_gimplify_function_node (cgn->decl);
-}
-
/* BuildEndFunctionCode - generates the function epilogue. */
void