From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 609BE3858C52 for ; Tue, 21 Mar 2023 18:18:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 609BE3858C52 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-pf1-x431.google.com with SMTP id cu12so4361224pfb.13 for ; Tue, 21 Mar 2023 11:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679422688; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=glhdWqSTG9oLhvBeVNylsHiYQ+nm4vZbRST2mkSxzSM=; b=JfW6PTw+n7ylA9zb0JToJ7u+f8ugfNLTTIHpMt2hAO+HinAUjkD7VFoYNNOMY9brgR uG5aqmO6wcQU3KnDyY/4RHPU19lTadEncb564a15eOaRZlPG0PhG3EHGAKckd7+eKRN9 Eh3FXD8OgtGUODI53u5ZiAPCACv0qkETkWpXx3OS9tVyCiIUgGP0IhxGuc8D9U5CeS+P bDUV2LP0ZctMx4ahCf+O1ezApoa+i0xnm+D7xQOECyiXuYd5erxsA+bsWWVqxiDvwx2W I3rdO7bWS89OSRKhLUdL24NU/7UnOtTodAs9ROHZ8vBxYTYvjjfb93twZqVrEQhJu1a+ 9Djg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679422688; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=glhdWqSTG9oLhvBeVNylsHiYQ+nm4vZbRST2mkSxzSM=; b=yxMCPfXnLklIjLSVc8X4KUki9+6kV2fPM2i5NYbhBDYK47mcDpRu8Qaf7/7Jwno7q/ FdS8n5mOTGZytfId9iW7Bf4F1UaSl01f1HEuu3OBwZ0IUIIAibtUm+9+uKOwyEG7cGwP 3Zt6M/mJDReDgBfTroVfi452fyTKJPoBK4fN3OU5zwfyH5ScnAFkYHP8nFGU75aZM2zS BoA0k6b9hAcd/isiOONtWU8XkDlJ4MKCYLCUahj+w71lXNYha6bMkN49o4rKUGfBnbyO vjpYsxM1PZsFazlrqi21GSe4et77e5BeTGq/SnYg6rhWb5EFlD3R6dkI8plSI4svJ7NC qLLA== X-Gm-Message-State: AO0yUKW0nW3xRwJboPZ67rP+kuzYe8AWxMueSlWteUjVhlgxcqZ28uPG SwQaVNEl54+FHvVLZBbNGcqwIj3TT8M= X-Google-Smtp-Source: AK7set9bH/L/HcBvicFuUIlQmqsQYAwpmYBy+FS5ADqx3nhRGCGF76afJhPu+GCNwoBdnbp/jNJxEQ== X-Received: by 2002:a62:1d42:0:b0:623:5880:98cd with SMTP id d63-20020a621d42000000b00623588098cdmr924556pfd.5.1679422687894; Tue, 21 Mar 2023 11:18:07 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id e15-20020a62aa0f000000b006259e883ee9sm6189562pff.189.2023.03.21.11.18.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Mar 2023 11:18:07 -0700 (PDT) Message-ID: Date: Tue, 21 Mar 2023 12:18:06 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: Should -ffp-contract=off the default on GCC? Content-Language: en-US To: Alexander Monakov Cc: gcc-patches@gcc.gnu.org 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> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 3/21/23 12:12, Alexander Monakov wrote: >>> Yes, it’s better to know the details of languages standard. -:) >>> However, I don’t 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. >> >> 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. >> >> 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. > > 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 blurb for > the -ffp-contract= 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. Jeff