https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #10 from drepper at gcc dot gnu.org ---
Author: drepper
Date: Wed Jan 16 08:01:22 2019
New Revision: 267964
URL: https://gcc.gnu.org/viewcvs?rev=267964&root=gcc&view=rev
Log:
PR libstdc++/88738 treat shared_ptr and unique_ptr more lik
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #9 from Jonathan Wakely ---
The standard maybe_unused attribute seems suitable. If an equality or
relational operator function has that attribute, don't warn if its result is
unused.
So weird operators with side effects can use the a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #8 from Marc Glisse ---
(In reply to Jonathan Wakely from comment #7)
> Yes, I would guess that clang's "dumb" warning is fine for 99% of cases, and
> the handful of exceptions could use #pragma to disable the warning.
Or an attribut
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #7 from Jonathan Wakely ---
Yes, I would guess that clang's "dumb" warning is fine for 99% of cases, and
the handful of exceptions could use #pragma to disable the warning.
But until/unless G++ gets such a warning, decorating the lib
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #6 from Ulrich Drepper ---
(In reply to Martin Sebor from comment #5)
> If it did we could have GCC apply it implicitly to
> all such functions or operators defined in namespace std, and provide a new
> attribute to disable it in the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #5 from Martin Sebor ---
I can see how applying the attribute to every standard library function, even
const, might be excessive, but I wonder if it would make sense for the majority
of them, or at least for most equality and relation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #4 from Jonathan Wakely ---
(In reply to Ulrich Drepper from comment #3)
> Created attachment 45416 [details]
> Add nodiscard support
>
> As Martin suggested, we could indeed use existing attributes in library code
> to warn about so
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
--- Comment #3 from Ulrich Drepper ---
Created attachment 45416
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45416&action=edit
Add nodiscard support
As Martin suggested, we could indeed use existing attributes in library code to
warn abo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88738
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Status|UNCONFIRMED