From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13158 invoked by alias); 1 Feb 2012 17:57:41 -0000 Received: (qmail 13148 invoked by uid 22791); 1 Feb 2012 17:57:40 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Feb 2012 17:57:27 +0000 From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50308] __attribute__((deprecated)) incorrectly generates warning in ADL lookup Date: Wed, 01 Feb 2012 17:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg00090.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 Iain Sandoe changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iains at gcc dot gnu.org --- Comment #2 from Iain Sandoe 2012-02-01 17:57:04 UTC --- the warning is generated from: /GCC/gcc-live-trunk/gcc/cp/semantics.c:3342 the decl is unused on entry to finish_id_expression () .. .. and marked as used (on line 3306) ... is that expected? Otherwise, I'd assume that we could guard line 3342 with say... if (TREE_USED (decl) && TREE_DEPRECATED (decl)) warn_deprecated_use (decl, NULL_TREE); dunno.. === (gdb) call debug_tree(node) > QI size unit size align 8 symtab 0 alias set -1 canonical type 0x42129f00 arg-types chain >>> used public deprecated external QI file ../tests-attr/pr50308-1.C line 1 col 6 align 8 context arguments unit size align 32 symtab 0 alias set -1 canonical type 0x4211a3c0 precision 32 min max pointer_to_this > SI file ../tests-attr/pr50308-1.C line 1 col 9 size unit size align 32 context arg-type > full-name "void A(int)" chain >