[{"id":1798604,"web_url":"http://patchwork.ozlabs.org/comment/1798604/","msgid":"<668b09c8-55b6-0a4a-f896-87fd4d71c61c@acm.org>","list_archive_url":null,"date":"2017-11-03T13:14:00","subject":"Re: [PR c++/82710] false positive paren warning","submitter":{"id":9970,"url":"http://patchwork.ozlabs.org/api/people/9970/","name":"Nathan Sidwell","email":"nathan@acm.org"},"content":"On 11/02/2017 02:24 PM, Nathan Sidwell wrote:\n> This patch fixes pr82710, were we erroneously warn on something like:\n>     friend class_X (::other::name (...));\n> the parens are needed, otherwise the '::other' is taken to be a \n> qualified lookup inside the class_X.\n> \n> Unfortunately, at the point we can check, we've lost information that \n> '::' was used.  So I back off when we see a qualified name there.\n\nI realized CLASS_TYPE_P was overly restrictive.  There are other \nclass-like entities that also need protection (typename_types etc). \nFixed with this patch that uses MAYBE_CLASS_TYPE and ENUMERAL_TYPE.  I \npushed this test to the end, as it is more complicated, so we'll only \nget to it after we know we have a qualified name.\n\nnathan","headers":{"Return-Path":"<gcc-patches-return-465843-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-465843-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"BEZh/QjV\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yT2V40HK4z9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  4 Nov 2017 00:14:19 +1100 (AEDT)","(qmail 26929 invoked by alias); 3 Nov 2017 13:14:10 -0000","(qmail 26912 invoked by uid 89); 3 Nov 2017 13:14:08 -0000","from mail-yw0-f178.google.com (HELO mail-yw0-f178.google.com)\n\t(209.85.161.178) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 03 Nov 2017 13:14:07 +0000","by mail-yw0-f178.google.com with SMTP id j4so2355009ywb.2 for\n\t<gcc-patches@gcc.gnu.org>; Fri, 03 Nov 2017 06:14:07 -0700 (PDT)","from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254?\n\t([2620:10d:c091:200::4fa5]) by smtp.googlemail.com with\n\tESMTPSA id b11sm2616243ywc.84.2017.11.03.06.14.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256\n\tbits=128/128); Fri, 03 Nov 2017 06:14:02 -0700 (PDT)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:from:to:references:message-id:date:mime-version\n\t:in-reply-to:content-type; q=dns; s=default; b=AvNZn62eYf0ekVjBu\n\tFfyF6ljKG5w6MNWLwPo1IB832fa10wcNIENCQ/F02QxqxjxKesD8UIeqcRClvGwI\n\tUiqEOaNZLcAOM2S00h3I+MHTod+QIuG77AoB+xMvPXJlW7Avo7nSj5QUWmBVX1t0\n\t2pGGygVo0CvW6/ua8xocHu6JKg=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:from:to:references:message-id:date:mime-version\n\t:in-reply-to:content-type; s=default; bh=h5CJlHvS2lc8C4tMY3f8QDT\n\tjBdo=; b=BEZh/QjVMGXj31AV6j9XLohC6YZTlO5yJg0rEGw9B+H95Yqpg+7WLWN\n\tDC7Qp1y+pGbbQ8xk/WaFAXDqtAFN0G8dAKWzQ1RfbkIclGuZNlMxYeNHNWrniTKm\n\t5JbZjb1TmkuTm7h68v9jCJzIWaKPV58jtjVVSRhyBIDTW9q2lFH0=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-10.6 required=5.0 tests=BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=ben","X-HELO":"mail-yw0-f178.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:sender:subject:from:to:references:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language;\n\tbh=ARmkkaXut9q80mC8lmlwnI3qQKs9wxtMHQwwG1ikYV4=;\n\tb=runyDKJk0rLhTJjcdsr1J0GAdqGVlQt+/4QvLLdVIuN3BnUnjadT0wDBY1SGXc3lRK\n\tP3JB4PLwFLODuYTrMneO9raQZQmr9UJoeLrLhTgmwNYvSsQqtGrtW8ZQkQSYNrGf8rGD\n\tkay55fjsQ4eiqMPbAapnvwzOs+p1rKVr3ZRv4YQoUEIho3y7D9JsYl8YriRLalZ/TD98\n\t7naOz9BDJdcqMiLnIEXWJYBvMxrSy7i3QQi2oK1eQsJrqU8XC1lYLjXBTi+roYRB2IpW\n\tTmi7WjeETX7RdBO+8CprTjHE0qHDtvrZLfaHtW7up/GEw/IMV8CfbdK3B6K6hdgR3YiT\n\tmrgg==","X-Gm-Message-State":"AMCzsaUDdib3Gsr+7hTuo3UWB7erhh0IWZ7m89f86oBI8hwwR/EMVqcF\tajjCWvlxcWCbK38TBrBNeeI=","X-Google-Smtp-Source":"ABhQp+QghM6gv6oT3SQyYqZwYVYGTYWS6iN2uNIatmESytunLvV+ulTiiC1T7UdUYJDjebkmtzxhhw==","X-Received":"by 10.129.70.67 with SMTP id t64mr4699299ywa.426.1509714845593;\n\tFri, 03 Nov 2017 06:14:05 -0700 (PDT)","Subject":"Re: [PR c++/82710] false positive paren warning","From":"Nathan Sidwell <nathan@acm.org>","To":"GCC Patches <gcc-patches@gcc.gnu.org>","References":"<39398177-ddf0-51de-78d1-7129062ab448@acm.org>","Message-ID":"<668b09c8-55b6-0a4a-f896-87fd4d71c61c@acm.org>","Date":"Fri, 3 Nov 2017 09:14:00 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.4.0","MIME-Version":"1.0","In-Reply-To":"<39398177-ddf0-51de-78d1-7129062ab448@acm.org>","Content-Type":"multipart/mixed;\n\tboundary=\"------------B1987C20892FC23D29F4C5E0\""}}]