From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F11139540BC; Tue, 28 Apr 2020 15:52:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F11139540BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588089153; bh=gnWONbEHy/AJpJFMmMGD0Oc/6A5ut+VwWcHpXB/GYbw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x7qk4SEbq313eLP11TB7jZhacOz0B3mLXx79dOmzXHYL5WTrNN1+Rqs2z+iw5DRyZ ZUgwMlnG25Weajq5g9xwS3D2Z5aVyQc87CzX8WbHm8X6/S2n1L266qPBCmfOybf0W0 Qp26JRbq4AkL9qktljJz6T0axT/AkUtvxh52qDmY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/79585] spurious -Wunused-variable on a pointer with attribute unused in function template Date: Tue, 28 Apr 2020 15:52:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2020 15:52:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D79585 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:aa988998be8f85334665a6b049d5d9139408c250 commit r9-8550-gaa988998be8f85334665a6b049d5d9139408c250 Author: Jason Merrill Date: Mon Jan 27 05:45:01 2020 -0500 c++: Avoid ICE with dependent attribute on type. We previously happened to accept this testcase, but never actually did anything useful with the attribute. The patch for PR86379 stopped using TREE_TYPE as USING_DECL_SCOPE, so 'using A::b' no longer had TREE_TYPE = set, so the language-independent decl_attributes started crashing on it. GNU attributes are more flexible in their placement than C++11 attribut= es, so if we encounter a dependent GNU attribute that syntactically apperta= ins to a type rather than the declaration as a whole, move it to the declaration; that's almost certainly what the user meant, anyway. gcc/cp/ChangeLog 2020-01-27 Jason Merrill PR c++/90750 PR c++/79585 * decl.c (grokdeclarator): Move dependent attribute to decl. * decl2.c (splice_template_attributes): No longer static.=