]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/122009: Rename local variables to avoid warnings and add const char
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 2 Oct 2025 13:36:42 +0000 (14:36 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 2 Oct 2025 13:36:42 +0000 (14:36 +0100)
commit328dc7f2dd1ab1e60633647f9a1fb2ec717a9afc
tree594b6ca522ebb0a893fb52012b1009a31557d5ee
parent14010053dac93f64e34b4b71804bec7ec984b595
PR modula2/122009: Rename local variables to avoid warnings and add const char

This patch renames local variables in M2WIDESET.mod to avoid compile time
warnings.  It also fixes the parameter declaration in BuildEnumerator to
include the const modifier.

gcc/m2/ChangeLog:

PR modula2/122009
* gm2-compiler/M2GCCDeclare.mod (PrintKnown): Remove.
* gm2-gcc/m2type.cc (m2type_BuildEnumerator): Add const modifier.
* gm2-gcc/m2type.def (BuildEnumerator): Use ConstCharStar type.
* gm2-gcc/m2type.h (m2type_BuildEnumerator): Add const modifier.
* gm2-libs/M2WIDESET.mod (ShiftLeftByteBit): Rename variable to
as toIdx.
Rename variable from as fromIdx.
(ShiftRightByteBit): Rename variable to as toIdx.
Rename variable from as fromIdx.
(RotateLeft): Rename variable to as toIdx.
Rename variable from as fromIdx.
(ArithShiftLeftBit): Rename set to setb.
(ArithShiftRightBit): Rename set to setb.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/M2GCCDeclare.mod
gcc/m2/gm2-gcc/m2type.cc
gcc/m2/gm2-gcc/m2type.def
gcc/m2/gm2-gcc/m2type.h
gcc/m2/gm2-libs/M2WIDESET.mod