aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2024-09-24 00:28:19 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2024-09-24 00:28:19 +0100
commit5ef52ec422b8b92539baaa761ad878ccb6f82db8 (patch)
tree522325ab8604520c6e8f232264f021919455fc5c
parent0121b852c85db91babdb346f277ca6220eb7df86 (diff)
downloadgcc-5ef52ec422b8b92539baaa761ad878ccb6f82db8.zip
gcc-5ef52ec422b8b92539baaa761ad878ccb6f82db8.tar.gz
gcc-5ef52ec422b8b92539baaa761ad878ccb6f82db8.tar.bz2
modula2: Add noreturn attribute to m2/gm2-libs/M2RTS.mod
This patch removes a build warning by adding a noreturn attribute to the M2RTS.mod:HaltC procedure. Also add an infinite loop to gm2-libs-min/M2RTS.mod. gcc/m2/ChangeLog: * Make-lang.in (m2/gm2-libs-boot/M2RTS.o): Remove --suppress-noreturn. * gm2-libs/M2RTS.mod (HaltC): Add noreturn attribute. * gm2-libs-min/M2RTS.mod (HALT): Add LOOP END. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r--gcc/m2/Make-lang.in2
-rw-r--r--gcc/m2/gm2-libs-min/M2RTS.mod2
-rw-r--r--gcc/m2/gm2-libs/M2RTS.mod2
3 files changed, 4 insertions, 2 deletions
diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index 02754e9..480c4fb 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -1477,7 +1477,7 @@ mcflex.c: $(srcdir)/m2/mc/mc.flex
m2/gm2-libs-boot/M2RTS.o: $(srcdir)/m2/gm2-libs/M2RTS.mod $(MCDEPS) $(BUILD-BOOT-H)
-test -d $(@D)/$(DEPDIR) || $(mkinstalldirs) $(@D)/$(DEPDIR)
- $(MC) --suppress-noreturn -o=m2/gm2-libs-boot/M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod
+ $(MC) -o=m2/gm2-libs-boot/M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod
$(COMPILER) $(CM2DEP) -c -DIN_GCC $(CFLAGS) $(GM2_PICFLAGS) $(MC_SRC_FLAGS) -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -I$(srcdir)/m2/gm2-libs-ch $(MCINCLUDES) $(INCLUDES) m2/gm2-libs-boot/M2RTS.c -o $@
$(POSTCOMPILE)
diff --git a/gcc/m2/gm2-libs-min/M2RTS.mod b/gcc/m2/gm2-libs-min/M2RTS.mod
index ae8cbff..1f04a02 100644
--- a/gcc/m2/gm2-libs-min/M2RTS.mod
+++ b/gcc/m2/gm2-libs-min/M2RTS.mod
@@ -69,6 +69,8 @@ END ExecuteInitialProcedures ;
PROCEDURE HALT ;
BEGIN
+ LOOP
+ END
END HALT ;
diff --git a/gcc/m2/gm2-libs/M2RTS.mod b/gcc/m2/gm2-libs/M2RTS.mod
index 41add83..5ea4d17 100644
--- a/gcc/m2/gm2-libs/M2RTS.mod
+++ b/gcc/m2/gm2-libs/M2RTS.mod
@@ -286,7 +286,7 @@ END ErrorMessageC ;
to stderr and calls exit (1).
*)
-PROCEDURE HaltC (description, filename, function: ADDRESS; line: CARDINAL) ;
+PROCEDURE HaltC (description, filename, function: ADDRESS; line: CARDINAL) <* noreturn *> ;
BEGIN
ErrorMessageC (description, filename, line, function)
END HaltC ;