[Bug c++/67960] [8/9/10 Regression] Prefixing a function with [[deprecated]] produces multiple warnings

2020-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.4 |8.5

--- Comment #6 from Jakub Jelinek  ---
GCC 8.4.0 has been released, adjusting target milestone.

[Bug c++/67960] [8/9/10 Regression] Prefixing a function with [[deprecated]] produces multiple warnings

2019-10-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.4

[Bug c++/67960] [8/9/10 Regression] Prefixing a function with [[deprecated]] produces multiple warnings

2019-05-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

Jonathan Wakely  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2019-05-13
  Known to work||7.4.0
 Resolution|DUPLICATE   |---
Summary|Prefixing a function with   |[8/9/10 Regression]
   |[[deprecated]] produces |Prefixing a function with
   |multiple warnings   |[[deprecated]] produces
   ||multiple warnings
 Ever confirmed|0   |1
  Known to fail||10.0, 6.5.0, 8.3.0, 9.1.0

--- Comment #2 from Jonathan Wakely  ---
This is not a dup of PR 79078, because that's about issuing warnings in too
many places, this is just about issuing the same one too many times.

This seems to have been fixed for GCC 7, as only one warning is given, but then
regressed for GCC 8, which gives two warnings.

[Bug c++/67960] [8/9/10 Regression] Prefixing a function with [[deprecated]] produces multiple warnings

2019-05-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

Jonathan Wakely  changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org

--- Comment #3 from Jonathan Wakely  ---
This regressed with r259067:

[PR c++/84943] mark function as used when taking its address

fn[0]() ICEd because we would fold the INDIRECT_REF used for the
array indexing while building the address for the call, after not
finding the decl hiding there at first.  But the decl would be exposed
by the folding, and then lower layers would complain we had the decl,
after all, but it wasn't one of the artificial or special functions
that could be called without being marked as used.

This patch arranges for a FUNCTION_DECL to be marked as used when
taking its address, just like we already did when taking the address
of a static function to call it as a member function (i.e. using the
obj.fn() notation).  However, we shouldn't mark functions as used when
just performing overload resolution, lest we might instantiate
templates we shouldn't, as in g++.dg/overload/template1.C, so we
adjust mark_used to return early when testing conversions.


for  gcc/cp/ChangeLog

PR c++/84943
* typeck.c (cp_build_addr_expr_1): Mark FUNCTION_DECL as
used.
* decl2.c (mark_used): Return without effects if tf_conv.

for  gcc/testsuite/ChangeLog

PR c++/84943
* g++.dg/pr84943.C: New.
* g++.dg/pr84943-2.C: New.

[Bug c++/67960] [8/9/10 Regression] Prefixing a function with [[deprecated]] produces multiple warnings

2019-05-13 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

Eric Gallager  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=79078

--- Comment #4 from Eric Gallager  ---
(In reply to Jonathan Wakely from comment #2)
> This is not a dup of PR 79078, because that's about issuing warnings in too
> many places, this is just about issuing the same one too many times.
> 
> This seems to have been fixed for GCC 7, as only one warning is given, but
> then regressed for GCC 8, which gives two warnings.

OK, so maybe not a dup, but it still seems related enough to go under "See
Also"

[Bug c++/67960] [8/9/10 Regression] Prefixing a function with [[deprecated]] produces multiple warnings

2019-11-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67960

Jonathan Wakely  changed:

   What|Removed |Added

 CC||euloanty at live dot com

--- Comment #5 from Jonathan Wakely  ---
*** Bug 92670 has been marked as a duplicate of this bug. ***