https://gcc.gnu.org/g:3851751ab968aa49c3db014ec064debbe31cef58
commit r14-10990-g3851751ab968aa49c3db014ec064debbe31cef58 Author: Gaius Mulley <gaiusm...@gmail.com> Date: Tue Nov 26 16:05:03 2024 +0000 [PATCH] modula2: change identifier names to avoid build warnings This fix avoids the following warnings: In implementation module ‘StdChans’: either the identifier has the same name as a keyword or alternatively a keyword has the wrong case (‘IN’ and ‘in’) 54 | stdnull: ChanId ; the symbol name ‘in’ is legal as an identifier, however as such it might cause confusion and is considered bad programming practice. gcc/m2/ChangeLog: * gm2-libs-iso/StdChans.mod (in): Rename to ... (inch): ... this. (out): Rename to ... (outch): ... this. (err): Rename to ... (errch): ... this. (cherry picked from commit b584f387bf74df9ba2cbbc07d00a05a105757329) Signed-off-by: Gaius Mulley <gaiusm...@gmail.com> Diff: --- gcc/m2/gm2-libs-iso/StdChans.mod | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gcc/m2/gm2-libs-iso/StdChans.mod b/gcc/m2/gm2-libs-iso/StdChans.mod index fbefbde4b101..e15d4ef95805 100644 --- a/gcc/m2/gm2-libs-iso/StdChans.mod +++ b/gcc/m2/gm2-libs-iso/StdChans.mod @@ -45,9 +45,9 @@ FROM RTgen IMPORT ChanDev, DeviceType, VAR - in, - out, - err, + inch, + outch, + errch, stdin, stdout, stderr, @@ -169,21 +169,21 @@ END NullChan ; PROCEDURE InChan () : ChanId ; (* Returns the identity of the current default input channel. *) BEGIN - RETURN( in ) + RETURN( inch ) END InChan ; PROCEDURE OutChan () : ChanId ; (* Returns the identity of the current default output channel. *) BEGIN - RETURN( out ) + RETURN( outch ) END OutChan ; PROCEDURE ErrChan () : ChanId ; (* Returns the identity of the current default error message channel. *) BEGIN - RETURN( err ) + RETURN( errch ) END ErrChan ; (* The following procedures allow for redirection of the default channels *) @@ -191,21 +191,21 @@ END ErrChan ; PROCEDURE SetInChan (cid: ChanId) ; (* Sets the current default input channel to that identified by cid. *) BEGIN - in := cid + inch := cid END SetInChan ; PROCEDURE SetOutChan (cid: ChanId) ; (* Sets the current default output channel to that identified by cid. *) BEGIN - out := cid + outch := cid END SetOutChan ; PROCEDURE SetErrChan (cid: ChanId) ; (* Sets the current default error channel to that identified by cid. *) BEGIN - err := cid + errch := cid END SetErrChan ; @@ -303,9 +303,9 @@ END Init ; BEGIN Init FINALLY - SafeClose(in) ; - SafeClose(out) ; - SafeClose(err) ; + SafeClose(inch) ; + SafeClose(outch) ; + SafeClose(errch) ; SafeClose(stdin) ; SafeClose(stdout) ; SafeClose(stderr)