From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129521 invoked by alias); 21 May 2019 21:33:54 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 129512 invoked by uid 89); 21 May 2019 21:33:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:0c874cf, H*f:sk:0c874cf, After, HContent-Transfer-Encoding:8bit X-HELO: mail-qt1-f173.google.com Received: from mail-qt1-f173.google.com (HELO mail-qt1-f173.google.com) (209.85.160.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 May 2019 21:33:52 +0000 Received: by mail-qt1-f173.google.com with SMTP id i26so22308024qtr.10 for ; Tue, 21 May 2019 14:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=q0q7rTfug8KF+e5dZuNaCCzrkNxJgmiPu3lHfzzL9wk=; b=emKN/qZFzubn6ubFlqIj6u8y6h/lK4p8XyceLe6phm623nDFGMh23F2DyGsLEAz73D Gq7vWA2AWt8mnXrs2MtaBszdy2IP3PsTydx+LpMUH19FgGv8qJpxyPvA8YYgdeR6Lh2B yE7DeRgw+wgacyclclrF+7oFr4GSleixYZCRewG6A47tiwIfGWJKcggPdhtQ+hoTN6IH lz+211y/uvbERs3vk3k9KPbAly1j8cbUgOBfWxr1wONDMWbWE2y/Momt8cPyrGMPArX/ m87P7XW33fxb5KnJ+HXE3+BT+LbbLaCH6vP+Zl1bp6o1a6DoDU1Ku0Yvpn7kERgMIjCg qRIg== Return-Path: Received: from [192.168.0.41] (97-118-125-210.hlrn.qwest.net. [97.118.125.210]) by smtp.gmail.com with ESMTPSA id l127sm9518258qkc.81.2019.05.21.14.33.49 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 14:33:49 -0700 (PDT) Subject: Re: -Wformat-diag: floating-point or floating point? To: Bill Schmidt , gcc@gcc.gnu.org References: <5ddd8f0f-e2f0-62f2-ae38-c860398cb4bb@gmail.com> <0c874cf4-4f78-f439-4546-942f8855bf63@linux.ibm.com> From: Martin Sebor Message-ID: <7550d1f6-e423-3ad9-9db2-f7940f61c6a3@gmail.com> Date: Tue, 21 May 2019 21:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <0c874cf4-4f78-f439-4546-942f8855bf63@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00171.txt.bz2 On 5/21/19 2:18 PM, Bill Schmidt wrote: > On 5/21/19 11:47 AM, Martin Sebor wrote: >> The GCC coding style says to use "floating-point" as an adjective >> rather than "floating point."  After enhancing the -Wformat-diag >> checker to detect this I found a bunch of uses of the latter, such >> as in: >> >>   gcc/c/c-decl.c:10944 >>   gcc/c/c-parser.c:9423, 9446, 9450, etc. >>   gcc/convert.c:418, 422 >>   gcc/cp/call.c:5070 >>   gcc/cp/cvt.c:886 >> >> Before I fix them all and adjust the tests, I want to make sure >> we really want to follow this rule.  The C standard uses both >> interchangeably.  With just one exception, the C++ standard uses >> the hyphenated form. > The hyphenated form is correct English, so I certainly prefer it. :-) I agree and I'm changing the C/C++ FE diagnostics to match. I count just 31 test that look for the unhyphenated form, and of those just three under the gcc.target directory, so the fallout should be fairly limited. Thanks Martin PS As a heads up, below are the target-specific tests I found: gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c: return (long long int) __builtin_vec_scalar_extract_sig (source); /* { dg-error "requires ISA 3.0 IEEE 128-bit floating point" } */ gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c: return scalar_insert_exp (significand, exponent); /* { dg-error "requires ISA 3.0 IEEE 128-bit floating point" } */ gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c: return scalar_extract_exp (source); /* { dg-error "requires ISA 3.0 IEEE 128-bit floating point" } */