From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15920 invoked by alias); 15 Nov 2017 16:38:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 15770 invoked by uid 89); 15 Nov 2017 16:38:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Nov 2017 16:38:36 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B466B61460; Wed, 15 Nov 2017 16:38:34 +0000 (UTC) Received: from localhost (unknown [10.33.36.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30A22A27A2; Wed, 15 Nov 2017 16:38:30 +0000 (UTC) Date: Wed, 15 Nov 2017 16:59:00 -0000 From: Jonathan Wakely To: Martin Sebor Cc: Martin =?utf-8?B?TGnFoWth?= , Jason Merrill , Marek Polacek , Jakub Jelinek , gcc-patches List Subject: Re: [PATCH][RFC] Add quotes for constexpr keyword. Message-ID: <20171115163829.GG31922@redhat.com> References: <20171012084834.GS14653@tucnak> <451b4f3d-d858-bbc8-5d1f-6056af5963d3@suse.cz> <20171018125252.GC19284@redhat.com> <99de094c-0e98-f2f2-39a9-a7394e0604ad@redhat.com> <0d484e7b-782b-7c4c-cdda-723efffe15a5@suse.cz> <7f78d1c7-ac2a-c43b-d0fb-9c09c70b65b2@gmail.com> <230260f8-2f1d-7f6d-973d-05ebe8ea78a4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <230260f8-2f1d-7f6d-973d-05ebe8ea78a4@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.1 (2017-09-22) X-SW-Source: 2017-11/txt/msg01228.txt.bz2 On 15/11/17 09:30 -0700, Martin Sebor wrote: >On 11/15/2017 05:45 AM, Martin Liška wrote: >>On 11/06/2017 07:29 PM, Martin Sebor wrote: >>>Sorry for being late with my comment. I just spotted this minor >>>formatting issue. Even though GCC isn't (yet) consistent about >>>it the keyword "constexpr" should be quoted in the error message >>>below (and, eventually, in all diagnostic messages). Since the >>>patch has been committed by now this is just a reminder for us >>>to try to keep this in mind in the future. >> >>Hi. >> >>I've prepared patch for that. If it's desired, I can fix test-suite follow-up. >>Do we want to change it also for error messages like: >>"call to non-constexpr function" >>"constexpr call flows off the end of the function" > >If GCC had support for italics for defined terms of the language >or the grammar /constexpr function/ would be italicized because >it's a defined term. Absent that, I think I would quote them all >for consistency. > >Martin > >PS I checked the C++ standard to see how it used the term and >the choices it makes seem pretty arbitrary. There are even >sentences with two instances of two word, one in fixed width >font and the other in proportional. So I don't think we can >use the spec as an example to follow. Did you check the latest draft? That should have been fixed. Defined terms should only be italicized when introduced, not when used, e.g. in [dcl.constexpr] p2 "constexpr function" and "constexpr constructor" are italicized, but are in normal font elsewhere. When referring specifically to the keyword `constexpr` it should be in code font. Grammar productions are always italicized, but "constexpr function" is not a grammar production.