public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup @ 2011-09-06 18:05 gd_bugzilla at growndodo dot com 2012-02-01 3:14 ` [Bug c++/50308] " pinskia at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: gd_bugzilla at growndodo dot com @ 2011-09-06 18:05 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 Bug #: 50308 Summary: __attribute__((deprecated)) incorrectly generates warning in ADL lookup Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: gd_bugzilla@growndodo.com void A( int ) __attribute__((deprecated)); namespace B { struct C {}; void A( C ) {} } int main (int argc, const char * argv[]) { B::C x; // ADL correctly identifies the non-deprecated B::A, but a warning about the global A is generated anyway A( x ); return 0; } ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/50308] __attribute__((deprecated)) incorrectly generates warning in ADL lookup 2011-09-06 18:05 [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup gd_bugzilla at growndodo dot com @ 2012-02-01 3:14 ` pinskia at gcc dot gnu.org 2012-02-01 3:15 ` pinskia at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-02-01 3:14 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17729 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-01 03:13:19 UTC --- Confirmed. Looks related to PR 17729. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/50308] __attribute__((deprecated)) incorrectly generates warning in ADL lookup 2011-09-06 18:05 [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup gd_bugzilla at growndodo dot com 2012-02-01 3:14 ` [Bug c++/50308] " pinskia at gcc dot gnu.org @ 2012-02-01 3:15 ` pinskia at gcc dot gnu.org 2012-02-01 17:57 ` iains at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-02-01 3:15 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-02-01 Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/50308] __attribute__((deprecated)) incorrectly generates warning in ADL lookup 2011-09-06 18:05 [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup gd_bugzilla at growndodo dot com 2012-02-01 3:14 ` [Bug c++/50308] " pinskia at gcc dot gnu.org 2012-02-01 3:15 ` pinskia at gcc dot gnu.org @ 2012-02-01 17:57 ` iains at gcc dot gnu.org 2012-02-02 10:55 ` iains at gcc dot gnu.org 2012-02-02 11:00 ` iains at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: iains at gcc dot gnu.org @ 2012-02-01 17:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iains at gcc dot gnu.org --- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> 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) <function_decl 0x421d7800 A type <function_type 0x42129f00 type <void_type 0x4211a720 void VOID align 8 symtab 0 alias set -1 canonical type 0x4211a720 pointer_to_this <pointer_type 0x4211a780>> QI size <integer_cst 0x4210478c constant 8> unit size <integer_cst 0x421047a8 constant 1> align 8 symtab 0 alias set -1 canonical type 0x42129f00 arg-types <tree_list 0x42114588 value <integer_type 0x4211a3c0 int> chain <tree_list 0x42114150 value <void_type 0x4211a720 void>>>> used public deprecated external QI file ../tests-attr/pr50308-1.C line 1 col 6 align 8 context <translation_unit_decl 0x4211c06c D.1> arguments <parm_decl 0x4210e8dc D.2180 type <integer_type 0x4211a3c0 int public SI size <integer_cst 0x421045cc constant 32> unit size <integer_cst 0x421045e8 constant 4> align 32 symtab 0 alias set -1 canonical type 0x4211a3c0 precision 32 min <integer_cst 0x421048c0 -2147483648> max <integer_cst 0x421048dc 2147483647> pointer_to_this <pointer_type 0x4211aae0>> SI file ../tests-attr/pr50308-1.C line 1 col 9 size <integer_cst 0x421045cc 32> unit size <integer_cst 0x421045e8 4> align 32 context <function_decl 0x421d7800 A> arg-type <integer_type 0x4211a3c0 int>> full-name "void A(int)" chain <function_decl 0x421cee80 __cxa_call_unexpected>> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/50308] __attribute__((deprecated)) incorrectly generates warning in ADL lookup 2011-09-06 18:05 [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup gd_bugzilla at growndodo dot com ` (2 preceding siblings ...) 2012-02-01 17:57 ` iains at gcc dot gnu.org @ 2012-02-02 10:55 ` iains at gcc dot gnu.org 2012-02-02 11:00 ` iains at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: iains at gcc dot gnu.org @ 2012-02-02 10:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 --- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> 2012-02-02 10:54:44 UTC --- Created attachment 26551 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26551 test-case see PR17729 for an updated patch that also passes for this PR. Attached, version of the example problem set up as a test-case for the test-suite. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/50308] __attribute__((deprecated)) incorrectly generates warning in ADL lookup 2011-09-06 18:05 [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup gd_bugzilla at growndodo dot com ` (3 preceding siblings ...) 2012-02-02 10:55 ` iains at gcc dot gnu.org @ 2012-02-02 11:00 ` iains at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: iains at gcc dot gnu.org @ 2012-02-02 11:00 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50308 --- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> 2012-02-02 10:59:40 UTC --- Comment on attachment 26551 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26551 test-case > // The original reported fault... > A (x); // { dg-bogus ".A. is deprecated .declared at .*pr50308-1.C:4." "" } duh, wrong version attached should be: A (x); // { dg-bogus ".void A.int.. is deprecated .declared at.*pr50308-1.C:4." "" } ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-02 11:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-06 18:05 [Bug c++/50308] New: __attribute__((deprecated)) incorrectly generates warning in ADL lookup gd_bugzilla at growndodo dot com 2012-02-01 3:14 ` [Bug c++/50308] " pinskia at gcc dot gnu.org 2012-02-01 3:15 ` pinskia at gcc dot gnu.org 2012-02-01 17:57 ` iains at gcc dot gnu.org 2012-02-02 10:55 ` iains at gcc dot gnu.org 2012-02-02 11:00 ` iains at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).