From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-a1p-077720.sys.comcast.net (resqmta-a1p-077720.sys.comcast.net [IPv6:2001:558:fd01:2bb4::6]) by sourceware.org (Postfix) with ESMTPS id 183503858D35 for ; Fri, 14 Jan 2022 14:59:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 183503858D35 Received: from resomta-a1p-077050.sys.comcast.net ([96.103.145.228]) by resqmta-a1p-077720.sys.comcast.net with ESMTP id 8N6Mn1toGIUDU8O2fneuuJ; Fri, 14 Jan 2022 14:59:01 +0000 Received: from smtpclient.apple ([73.60.223.101]) by resomta-a1p-077050.sys.comcast.net with ESMTPSA id 8O2dnJpUT1J9y8O2enfEIY; Fri, 14 Jan 2022 14:59:01 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvvddrtdehgdejudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpedvtdevjeeuhefhiedvteffjeeuffehkefgudeutdevffefkeeijeelfeevuefhgeenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepmhgrthiisehsuhhsvgdruggvpdhrtghpthhtohepmhgrrdhuvggtkhgvrhesghhmrghilhdrtghomhdprhgtphhtthhopehgtggtsehgtggtrdhgnhhurdhorhhg X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: reordering of trapping operations and volatile From: Paul Koning In-Reply-To: Date: Fri, 14 Jan 2022 09:58:59 -0500 Cc: Martin Uecker , GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: <09C9C641-02B2-4B83-B2C1-423DC573090B@comcast.net> References: <832b1b3957a0243ca37378a774effe537642eed3.camel@gmail.com> <40fd9a2f078cd6e87fedbc5f1e77baf8445a7356.camel@gmail.com> <02f4b13397f1d77db433ffc0c9401a6e66fb706d.camel@gmail.com> To: Michael Matz X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2022 14:59:04 -0000 > On Jan 14, 2022, at 9:15 AM, Michael Matz via Gcc = wrote: >=20 > Hello, >=20 > On Thu, 13 Jan 2022, Martin Uecker wrote: >=20 >>>>> Handling all volatile accesses in the very same way would be=20 >>>>> possible but quite some work I don't see much value in. >>>>=20 >>>> I see some value.=20 >>>>=20 >>>> But an alternative could be to remove volatile >>>> from the observable behavior in the standard >>>> or make it implementation-defined whether it >>>> is observable or not. >>>=20 >>> But you are actually arguing for making UB be observable >>=20 >> No, I am arguing for UB not to have the power >> to go back in time and change previous defined >> observable behavior. >=20 > But right now that's equivalent to making it observable, > because we don't have any other terms than observable or > undefined. As aluded to later you would have to > introduce a new concept, something pseudo-observable, > which you then started doing. So, see below. I find it really hard to view this notion of doing work for UB with any = favor. The way I see it is that a program having UB is synonymous with = "defective program" and for the compiler to do extra work for these = doesn't make much sense to me. If the issue is specifically the handling of overflow traps, perhaps a = better answer would be to argue for language changes that manage such = events explicitly rather than having them be undefined behavior. = Another (similar) option might be to choose a language in which this is = done. (Is Ada such a language? I don't remember.) paul