From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85474 invoked by alias); 22 Jul 2015 17:06:09 -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 85462 invoked by uid 89); 22 Jul 2015 17:06:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 22 Jul 2015 17:05:59 +0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t6MH5veu011255 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 Jul 2015 17:05:57 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t6MH5uDr006212 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 22 Jul 2015 17:05:57 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t6MH5nPt004357; Wed, 22 Jul 2015 17:05:52 GMT Received: from [192.168.1.4] (/87.18.233.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 22 Jul 2015 10:05:49 -0700 Subject: [Ping] Re: [C++ Patch/RFC] PR 53184 To: "gcc-patches@gcc.gnu.org" References: <5549350B.3050504@oracle.com> Cc: Jason Merrill From: Paolo Carlini Message-ID: <55AFCD65.6090000@oracle.com> Date: Wed, 22 Jul 2015 17:13:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <5549350B.3050504@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg01875.txt.bz2 Hi, On 05/05/2015 11:24 PM, Paolo Carlini wrote: > Hi, > > per the audit trail, this issue appears to boil down to two separate > issues: > - The warning doesn't appear universally useful, thus it would be nice > to give it a name in order to enable disabling it. > - As shown by the testcase, sometimes the wording is misleading: it > talks about 'anonymous namespace', where, as clarified by Jason in the > trail, the issue is really about a type with no linkage, no namespace > involved. > > - The former is easy done, I picked: -Wsubobject-linkage. Makes sense? > - The latter is a little more tricky, because it doesn't seem always > easy to tell one case from the other, in particular when templates are > involved (eg, g++.dg/warn/anonymous-namespace-3.C) and the linkage > issue involves template arguments. Given that the warning doesn't seem > terribly important (as another data point, clang doesn't have it), so > far I have conditionals which reliably figure out cases of anonymous > namespace and cases of no linkage (per the testcase at issue, for > example) and otherwise fall back to an 'or' wording. I hope the > improvement is good enough. Alternately, I suppose the warning could > use a completely different, more generic, wording, but in that case > testcases like anonymous-namespace-3.C will need adjustment. Any feedback on this? https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00370.html Thanks! Paolo.