From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18216 invoked by alias); 22 May 2019 12:28:04 -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 18204 invoked by uid 89); 22 May 2019 12:28:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:9c85ce7, H*M:f135, H*f:sk:9c85ce7 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 May 2019 12:28:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AD01A80D; Wed, 22 May 2019 05:28:00 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.206.226]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 10AE83F575; Wed, 22 May 2019 05:27:59 -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> <56afc1d8-058d-0086-291a-3fccda08be25@arm.com> <9c85ce74-1459-094d-0c6b-3fcffb0e7f4f@linux.ibm.com> From: "Richard Earnshaw (lists)" Openpgp: preference=signencrypt Message-ID: Date: Wed, 22 May 2019 12:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <9c85ce74-1459-094d-0c6b-3fcffb0e7f4f@linux.ibm.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-05/txt/msg00183.txt.bz2 On 22/05/2019 13:17, Bill Schmidt wrote: > On 5/22/19 5:19 AM, Richard Earnshaw (lists) wrote: >> On 21/05/2019 21:18, 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. :-) >>> >> It's not quite as simple as that. Hyphens should be used to make it >> clear what is the adjective and what is the noun: >> >> A floating-point number (hyphenated) is a number with a >> floating point (no hyphen). >> >> In the first case 'floating-point' is the adjective and qualifies >> number. In the second case 'floating' is the adjective and qualifies >> 'point'. >> >> But this is English, so there are probably some exceptions even then - >> but not in this case, I think. :-) > > English is always fun, agreed -- Martin cited the requirement to use > "floating-point" when it's used as an adjective, which is certainly correct. > > There's a more interesting question around cavalier usage such as, > "We should use floating point."  I would argue that there is an implied > noun "arithmetic" modified here, so this should also be hyphenated, > but I daresay there would be people on both sides of this one... I would argue that leaving out "arithmetic" is the error. :-) > > This is why grammar police usually die from friendly fire. :-) > Sticking your head above the parapet is always fraught with danger :) R.