From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7321 invoked by alias); 11 Feb 2017 20:36:19 -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 7302 invoked by uid 89); 11 Feb 2017 20:36:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:Sat, H*i:sk:CAH6eHd, H*i:sk:_45F1G3, H*f:vbvtphkx6DxaF X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 11 Feb 2017 20:36:16 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cceOz-0005c2-Cy from Sandra_Loosemore@mentor.com ; Sat, 11 Feb 2017 12:36:13 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 11 Feb 2017 12:36:11 -0800 Subject: Re: Doc question: is "templatized" a word? To: Jonathan Wakely , Gerald Pfeifer References: <589E8ED2.5070903@codesourcery.com> CC: "gcc@gcc.gnu.org" From: Sandra Loosemore Message-ID: <589F75BA.7050109@codesourcery.com> Date: Sat, 11 Feb 2017 20:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-SW-Source: 2017-02/txt/msg00035.txt.bz2 On 02/11/2017 06:21 AM, Jonathan Wakely wrote: > On 11 February 2017 at 08:48, Gerald Pfeifer wrote: >> On Fri, 10 Feb 2017, Sandra Loosemore wrote: >>> The documentation for -Wno-non-template-friend refers to "non-templatized >>> friend functions" and "templatized functions". I don't see the term >>> "templatized" used anywhere in the C++ standard. This paragraph also uses >>> "nontemplate function", which I assume refers to the same thing the C++ >>> standard spells "non-template function". So does "non-templatized function" >>> also mean "non-template function"? Or does it have some other meaning? >> >> I would avoid "templatized" and believe "non-template function" is >> more appropriate in your example. > > Yes, > > s/non-templatized/non-template/ > s/nontemplate/non-template/ > s/templatized function/function template/ > > But I wonder if that warning is even useful nowadays. The example of > "friend foo(int);" is bogus and is correctly rejected: > > fr.cc:2:17: error: ISO C++ forbids declaration of ‘foo’ with no type > [-fpermissive] > friend foo(int); > ^ I hadn't actually gotten that far :-) but it looks like that's an implicit-int error unrelated to the actual purpose of this option. This ended up on my todo list firstly because "templatized" didn't spell-check, and secondly because the "new compiler behavior" documented in connection with this option has existed at least since 1998 and can hardly be considered "new" any more. Also I think the reference to section 14.5.3 of the C++ standard is bit-rotten (it's 14.5.4 in the c++0x draft I have handy). I'll leave it up to the C++ experts to decide whether the option should just be removed and the warning replaced with a hard error controlled by some other flag. Otherwise the docs for this option need to be rewritten to explain what it does without reference to ancient changes in G++ from before templates were fully implemented. I can take a stab at that if nobody else offers up some alternative text first. -Sandra