aboutsummaryrefslogtreecommitdiff
path: root/libgm2/libm2log
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-09-13 15:51:59 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2023-09-13 15:51:59 +0100
commit3af2af15798cb6243e2643f98f62c9270b1ca5d2 (patch)
tree36782797afe9bc832e789c8dc7eb670ccd57964c /libgm2/libm2log
parentd03773c8efea216c67b3ac8870fcac2662c522fe (diff)
downloadgcc-3af2af15798cb6243e2643f98f62c9270b1ca5d2.zip
gcc-3af2af15798cb6243e2643f98f62c9270b1ca5d2.tar.gz
gcc-3af2af15798cb6243e2643f98f62c9270b1ca5d2.tar.bz2
modula2: -Wcase-enum detect singular/plural and use switch during build
This patch generates a singular or plural message relating to the number of enums missing. Use -Wcase-enum when building of the modula-2 libraries and m2/stage2/cc1gm2. gcc/m2/ChangeLog: * Make-lang.in (GM2_FLAGS): Add -Wcase-enum. (GM2_ISO_FLAGS): Add -Wcase-enum. * gm2-compiler/M2CaseList.mod (EnumerateErrors): Issue singular or plural start text prior to the enum list. Remove unused parameter tokenno. (EmitMissingRangeErrors): New procedure. (MissingCaseBounds): Call EmitMissingRangeErrors. (MissingCaseStatementBounds): Call EmitMissingRangeErrors. * gm2-libs-iso/TextIO.mod: Fix spacing. libgm2/ChangeLog: * libm2cor/Makefile.am (libm2cor_la_M2FLAGS): Add -Wcase-enum. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am (libm2iso_la_M2FLAGS): Add -Wcase-enum. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.am (libm2log_la_M2FLAGS): Add -Wcase-enum. * libm2log/Makefile.in: Regenerate. * libm2pim/Makefile.am (libm2pim_la_M2FLAGS): Add -Wcase-enum. * libm2pim/Makefile.in: Regenerate. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libgm2/libm2log')
-rw-r--r--libgm2/libm2log/Makefile.am2
-rw-r--r--libgm2/libm2log/Makefile.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/libgm2/libm2log/Makefile.am b/libgm2/libm2log/Makefile.am
index a15747f..27f3840 100644
--- a/libgm2/libm2log/Makefile.am
+++ b/libgm2/libm2log/Makefile.am
@@ -136,7 +136,7 @@ libm2log_la_M2FLAGS = \
-fm2-pathname=m2log -I$(GM2_SRC)/gm2-libs-log \
-fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \
-fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \
- -Wreturn-type -fcase -fm2-prefix=m2log
+ -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2log
if TARGET_DARWIN
libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup
else
diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in
index ba34a6b..97d7bdb 100644
--- a/libgm2/libm2log/Makefile.in
+++ b/libgm2/libm2log/Makefile.in
@@ -475,7 +475,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
@BUILD_LOGLIB_TRUE@ -fm2-pathname=m2log -I$(GM2_SRC)/gm2-libs-log \
@BUILD_LOGLIB_TRUE@ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \
@BUILD_LOGLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \
-@BUILD_LOGLIB_TRUE@ -Wreturn-type -fcase -fm2-prefix=m2log
+@BUILD_LOGLIB_TRUE@ -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2log
@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@libm2log_la_link_flags =
@BUILD_LOGLIB_TRUE@@TARGET_DARWIN_TRUE@libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup