From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 1A1A63858D3C for ; Tue, 21 Mar 2023 17:59:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A1A63858D3C 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-pl1-x62c.google.com with SMTP id u5so16861959plq.7 for ; Tue, 21 Mar 2023 10:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679421553; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZRrgxfoZBAeW4Vqpz1h69MofPtfluCh0OpKCbRrIQ+w=; b=Abut0GEj647J9gy9pfC6/lkBdALU9HUrkYXYBsi6g5cTuO+PeC+flmPfo+AgbNHcd9 BwYUrtDHOmDtrOyzXqJkGrfGDAM0K//YNfH9UOhSicNAmuXiD7lCXur6eS0eYE0eN5vN ALnfi4pM60rNog1n7m58mvg21o2nr2YIu2JHfs7d2vIDT1sS5Onxj8OsONqTSlEYcE7K ef5CtmPtvV12FSqY0Y6dmtLJPCM2IZGFgIOwB3DOS3gMwXPF3gr8YlDfNdWG8aI4cAxL 2xCigJzfozriorRaL6kaVxRqB/KLYIt/k4+xkOoQvuL/0wQY4L2RIsXnQDf8rN7kJN+h jhCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679421553; h=content-transfer-encoding:in-reply-to:from:references: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=ZRrgxfoZBAeW4Vqpz1h69MofPtfluCh0OpKCbRrIQ+w=; b=sy7oTKJyQLMTA/GkW6VJfXpGgJDTWZnf8iF53LUjRNz66RZmgUsY9XwfBFZEkO+sg1 e4tRHGWuUoZmgBu5ZfocGiM7YIoMzkn0LngKWlj6rwbsVG8NeIdVrIMmPHOPVNcbX0uv JW151RQsZW9rLgBfEVuoOR18IDyG3ZjlBYABbH7+FmsgebiJLoKCGk5EZYQU11CNV28J MIAze05ma+9X0mLdGAHo82S3JK2mTXOhvSRbqRQxUPmatM1W32sTJ5ksmKAOJKWlnSOr EjWQRM3AeKIt4wi6h+tohTr0Lukq8LrFYtp/YWdD1ZSGZTfkk1FVWoI6+VVPbylPX/2E uoSA== X-Gm-Message-State: AO0yUKU2OOnnkUQYiJUt6tx6k4egYlJ2wGhwMJ1VT5QDvIg1In+7bRey 6oq+dYQhhUQWysoeXwn+sbfPP7+9Iv0= X-Google-Smtp-Source: AK7set8/apQG7gDFOPwAHbFufsEaYs3TNMFCdAT4p2qJLUoYQqbK1H9rB6NoNaHFCcJ7xEL8mTDGSw== X-Received: by 2002:a05:6a20:49a8:b0:d8:c4b2:8824 with SMTP id fs40-20020a056a2049a800b000d8c4b28824mr2709537pzb.15.1679421553211; Tue, 21 Mar 2023 10:59:13 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id x10-20020a65538a000000b0050bc03741ffsm8421401pgq.84.2023.03.21.10.59.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Mar 2023 10:59:12 -0700 (PDT) Message-ID: <4a670847-9728-e0cb-46f3-d476839f7cd4@gmail.com> Date: Tue, 21 Mar 2023 11:59:11 -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: 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> From: Jeff Law In-Reply-To: <7C6B7ED7-7AA4-47EF-8E44-E3AD81BF3E29@oracle.com> 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 11:00, Qing Zhao via Gcc-patches wrote: > > >> On Mar 21, 2023, at 12:56 PM, Paul Koning wrote: >> >> >> >>> On Mar 21, 2023, at 11:01 AM, Qing Zhao via Gcc-patches wrote: >>> >>> ... >>> 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. >> >> 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’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. Jeff