From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-h1p-028594.sys.comcast.net (resqmta-h1p-028594.sys.comcast.net [IPv6:2001:558:fd02:2446::2]) by sourceware.org (Postfix) with ESMTPS id AEB9F3858D3C for ; Tue, 21 Mar 2023 18:03:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEB9F3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=comcast.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=comcast.net Received: from resomta-h1p-027911.sys.comcast.net ([96.102.179.202]) by resqmta-h1p-028594.sys.comcast.net with ESMTP id eelApHuN7RfBaegKYpKx5V; Tue, 21 Mar 2023 18:03:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1679421810; bh=9V27Rg/q4XgvyGR31D0R5CySv2QfV2lcxp5NjJPWYaM=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To:Xfinity-Spam-Result; b=2OGlEDNPOxcssOnVpDKspZnoJCD85RTrRoAuu0NoLZI5ErHcu6r2ha9fI4w1DCzEg s3AW5j65rJR3Pamww0163jOpx1jdhe0+uQqaUFXNa1IcelRdKsqZe0LO0QA+nww0o7 YoXKh0iw1TKveLKQS78yXEblIg2lHFyUWNr64LQx8ArY61YWZXT+RydP8NyTeM3sOh e0IcZl+GgsAPl2ho7FrSmQFJtK8+itrzt2y5FS2PGoGbFPCHfCRZLM00G9iushmVGo 3ZdOWpGvPZJOuF3g4IQJPMDcqSzEXokA+gsKLKv1JZsSiQtA43T/KAbXBtwet8zxiw gbnnn4GD6///A== Received: from smtpclient.apple ([73.60.223.101]) by resomta-h1p-027911.sys.comcast.net with ESMTPSA id egKTpsi2nN2puegKVp2wHJ; Tue, 21 Mar 2023 18:03:30 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegtddguddtiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecunecujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeelvedvhfffledujedvleeuffetudefvefhueffleefjeettdduhedvkeehvddvteenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjhgvfhhfrhgvhigrlhgrfiesghhmrghilhdrtghomhdprhgtphhtthhopehgtggtqdhprghttghhvghssehgtggtrdhgnhhurdhorhhg X-Xfinity-VMeta: sc=0.00;st=legit Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: Should -ffp-contract=off the default on GCC? From: Paul Koning In-Reply-To: <4a670847-9728-e0cb-46f3-d476839f7cd4@gmail.com> Date: Tue, 21 Mar 2023 14:03:25 -0400 Cc: gcc-patches@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: <07C4F156-7482-45F2-9388-67FF2C67A3BB@comcast.net> References: <6659A77B-DA2F-40A6-BDBD-E8B29B9E901D@oracle.com> <87384938-FDB1-487B-8B03-7787996435B2@comcast.net> <7C6B7ED7-7AA4-47EF-8E44-E3AD81BF3E29@oracle.com> <4a670847-9728-e0cb-46f3-d476839f7cd4@gmail.com> To: Jeff Law X-Mailer: Apple Mail (2.3696.120.41.1.2) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_PASS,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 List-Id: > On Mar 21, 2023, at 1:59 PM, Jeff Law via Gcc-patches = wrote: >=20 >=20 >=20 > On 3/21/23 11:00, Qing Zhao via Gcc-patches wrote: >>> On Mar 21, 2023, at 12:56 PM, Paul Koning = wrote: >>>=20 >>>=20 >>>=20 >>>> On Mar 21, 2023, at 11:01 AM, Qing Zhao via Gcc-patches = wrote: >>>>=20 >>>> ... >>>> Most of the compiler users are not familiar with language = standards, or no access to language standards. Without clearly = documenting such warnings along with the option explicitly, the users = have not way to know such potential impact. >>>=20 >>> With modern highly optimized languages, not knowing the standard is = going to get you in trouble. There was a wonderful paper from MIT a few = years ago describing all the many ways C can bite you if you don't know = the rules. >> Yes, it=E2=80=99s better to know the details of languages standard. = -:) >> However, I don=E2=80=99t think that this is a realistic expectation = to the compiler users: to know all the details of a language standard. > Umm, they really do need to know that stuff. >=20 > If the developer fails to understand the language standard, then = they're likely going to write code that is ultimately undefined or = doesn't behave in they expect. How is the compiler supposed to guess = what the developer originally intended? How should the compiler handle = the case when two developers have different understandings of how a = particular piece of code should work? In the end it's the language = standard that defines how all this stuff should work. >=20 > Failure to understand the language is a common problem and we do try = to emit various diagnostics to help developers avoid writing = non-conformant code. But ultimately if a developer fails to understand = the language standard, then they're going to be surprised by the = behavior of their code. Conversely, of course, the problem is that C and other languages have = evolved to the point that you have to be a language lawyer to write = valid code. In other words, a substantial fraction of programmers are = by definition writing unreliable code. This is not a good situation, = and it may be part of the reason why modern software has such a high = rate of defects. paul