From patchwork Wed Jul 24 10:09:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilken Gottwalt X-Patchwork-Id: 1964241 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=posteo.net header.i=@posteo.net header.a=rsa-sha256 header.s=2017 header.b=Az36f1Jx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WTVBS2QTXz1yXp for ; Wed, 24 Jul 2024 20:10:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 983133858C60 for ; Wed, 24 Jul 2024 10:10:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by sourceware.org (Postfix) with ESMTPS id E168B3858D29 for ; Wed, 24 Jul 2024 10:09:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E168B3858D29 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=posteo.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E168B3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.67.36.65 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721815789; cv=none; b=bZhnnFxzhm2r0jrVOaaqDm1IrQdpyzU5vUknuVGHPcIMLYl5OuEM/0R7+k7RrpV1xtoCmgswLeFuseM2gZXTEBWR3G34t0ai1VkJGpn1FmXUaSCy/8MG4Yes9RFdi51iy18U40/GM5rcSL/Yl+M/dL8wnggxG7foA/r2CTXzf2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721815789; c=relaxed/simple; bh=QBUZUu1cW5gAP+wdPjOkos9LH5W+3m3Vq9qhDIRTI8c=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=bc59yydIAh/QAg9pou47uhmQQXXBQKMh2QuLC+/LktOzhEKrhw3wIi13bONsTQ7eyIo3HvEAPk4+ffeyHPRtXW/WChGcbs1+5BBZ0i79J8v6rl00cOx709dCbkSyAfkzzE+/hQfqrXoEthleT8xjYKj1SNVrRtd+MZokbcIGj+I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9AC7F24002F for ; Wed, 24 Jul 2024 12:09:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1721815785; bh=QBUZUu1cW5gAP+wdPjOkos9LH5W+3m3Vq9qhDIRTI8c=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:From; b=Az36f1JxAbORp8haMpcKGBOzpPjE6rn5O8M0u0szsyb7Pw7+ulnjdVDI1sKamdMpU ladNzE4j0Z9py/ghNdLWPcH4MXdOPcybtoXX7pslrK4uYRIJqIZhsDyhmrBjcYdvr1 sO4o3qD+8Q2H8OEhM7TruJtIAf7CDbN38D5y5lgtPTUUr8ZnYkQwX3t9fwYKC14ZaF zlrvcreXwi9rbAX0xzlcNeOubIXK2tAyi/rc8dsdM5Go/6fHo0c+WQ/1bY65DsY1Co g6v26Nv7qmWon27JdMSfK4Ev4IaJZDZLCt+SuGCfEIbMtgnU2zRqQ0jz9srqL7xBFc /yNKwSajPFOwQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WTVB0641Lz6txL; Wed, 24 Jul 2024 12:09:44 +0200 (CEST) Date: Wed, 24 Jul 2024 10:09:43 +0000 From: Wilken Gottwalt To: gcc-patches@gcc.gnu.org Cc: Gaius Mulley Subject: [PATCH] gm2: fix bad programming practice warning Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Fix identifier names to be too similar to Modula-2 keywords and causing warnings coming from Modula-2's own libraries. m2/m2iso/StdChans.mod:54:20: note: 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 ; m2/m2iso/StdChans.mod:54:20: note: the symbol name ‘in’ is legal as an identifier, however as such it might cause confusion and is considered bad programming practice gcc/gm2: * gm2-libs-iso/StdChans.mod: Fix bad identifier warning. Signed-off-by: Wilken Gottwalt --- 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 fbefbde4b10..e15d4ef9580 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)