From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 7F7AF3858418 for ; Wed, 22 Mar 2023 10:14:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F7AF3858418 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x12b.google.com with SMTP id i13so6970222lfe.9 for ; Wed, 22 Mar 2023 03:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679480042; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TsbdfTQH76XWoMeluwFsBul1HKdvkNnbw4sUU4zg/pc=; b=BK9tvcjOAWKBRev/gf5BFbC5tZugYPfQpTVvb5d/6MIgQonnp/So/EUiXIFkHeq5ws jFyiDdLRyRjTpn1+JUjlQFHAjhZwgRislGGAQLbFstV15K94ctRngJDhrLinE6w8BNjB OkWr2znDpwqv/OSk1q5277Rw2AQLQ332D5ZMK1IyupwfIZquiT6HLToayLmAohzDC+dH +RXdNLP07LHbkKhh1S5Tr39/pErb6LPVYzoH+V3qhDFUjaHPaWvfbfnhRvsC5jLy6/nB es72xPcyaMMSt8Gu1qbZX7FzICX+6EgbC6zYfwiTaQNveFR0XPWz0DThIiFOSsy6R30l 2UNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679480042; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TsbdfTQH76XWoMeluwFsBul1HKdvkNnbw4sUU4zg/pc=; b=W0p7BuYQsJ7SVSVq+Z14CMGJrTeRqh0tJMHxVY2nrTNrmmpZa7kcw3VIqDvx8Aet5i fCSqfFsZdGghjVaCA/tehv5F1tJQczzcV3Ai1mkDNXSRSuP4dryWJ13DmON+JlTjezvF CNeYRMrJkaITu6uZ+045Wp5xD8KUzed16V985kDnbMj6rGimK9AeapFLHWg+8VloTwvf 6SJkcRTx6GEqISr50WIRGkD/9AK9kRi1VPamVt4rjrTGLt356qs3AS54TkFyl0qEbr15 lCbZM7486XhZPY/V4M8dreGmw7ZnM9ZxdbT20OEnnHxf53xByx3fRD2hJlsf+FNkSHeb +1fA== X-Gm-Message-State: AO0yUKWxFEhV1h6K/eKG8s4PmmQLH1iL7/kSwIQ/cYogstKIBhxlZH35 vwKersSlx0M9+eysFSx6I0pAVL4xQ+Qma1kcqF/Cei9L X-Google-Smtp-Source: AK7set+D1km2XB7QDye5esohHxfzsp6Hiwbb18NQNVTyzQAh16lECWg2Ql+yhqCYf5ROSiLhDzfDZsu7SRsl53jxY7Y= X-Received: by 2002:ac2:43b2:0:b0:4db:1ae1:318b with SMTP id t18-20020ac243b2000000b004db1ae1318bmr1708934lfl.5.1679480042145; Wed, 22 Mar 2023 03:14:02 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Richard Biener Date: Wed, 22 Mar 2023 11:13:30 +0100 Message-ID: Subject: Re: Should -ffp-contract=off the default on GCC? To: Jeff Law Cc: Alexander Monakov , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 List-Id: On Tue, Mar 21, 2023 at 7:18=E2=80=AFPM Jeff Law via Gcc-patches wrote: > > > > On 3/21/23 12:12, Alexander Monakov wrote: > >>> 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 t= o the compiler > >>> users: to know all the details of a language standard. > >> Umm, they really do need to know that stuff. > >> > >> If the developer fails to understand the language standard, then they'= re > >> likely going to write code that is ultimately undefined or doesn't beh= ave 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 a= ll this > >> stuff should work. > >> > >> Failure to understand the language is a common problem and we do try t= o emit > >> various diagnostics to help developers avoid writing non-conformant co= de. But > >> ultimately if a developer fails to understand the language standard, t= hen > >> they're going to be surprised by the behavior of their code. > > > > W h a t. > > > > This subthread concerns documenting the option better ("Without clearly > > documenting such warnings ..."). > > > > Are you arguing against adding a brief notice to the documentation blur= b for > > the -ffp-contract=3D option? > I was merely chiming in on Qing's statement that it is not realistic to > expect users to know the details of the language standard. I think it's even less realistic to expect users to know the details of floating-point math. So I doubt any such sentence will be helpful besides spreading some FUD? > > > Jeff