]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
modula2: Add noreturn attribute to m2/gm2-libs/M2RTS.mod
authorGaius Mulley <gaiusmod2@gmail.com>
Mon, 23 Sep 2024 23:28:19 +0000 (00:28 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Mon, 23 Sep 2024 23:28:19 +0000 (00:28 +0100)
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>
gcc/m2/Make-lang.in
gcc/m2/gm2-libs-min/M2RTS.mod
gcc/m2/gm2-libs/M2RTS.mod

index 02754e98c572a79d3b03a3000c429313ec30f159..480c4fb28a7e619f50ea240270834f567431df0b 100644 (file)
@@ -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)
 
index ae8cbfffbec9c2526362e7ae7ed344127daf88a5..1f04a027f82c305a6260a68f9fdeb377fd577cb6 100644 (file)
@@ -69,6 +69,8 @@ END ExecuteInitialProcedures ;
 
 PROCEDURE HALT ;
 BEGIN
+   LOOP
+   END
 END HALT ;
 
 
index 41add830766e80dac205b9857a1c4140fa1783f9..5ea4d17c02c2374ea66a4bf6f5e4fece8632bff9 100644 (file)
@@ -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 ;