This is the mail archive of the
mailing list for the GCC project.
Re: [C++ Patch] Do not warn about [[nodiscard]] applied to a constructor
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 1 Aug 2019 15:44:27 -0400
- Subject: Re: [C++ Patch] Do not warn about [[nodiscard]] applied to a constructor
- References: <firstname.lastname@example.org>
On Thu, Aug 1, 2019 at 12:36 PM Paolo Carlini <email@example.com> wrote:
> in Cologne, during the presentation of P1771R0, Per Sommerlad pointed
> out that apparently GCC was already almost doing the right thing - it
> accepts [[nodiscard]] on a constructor and then a warning is emitted in
> the relevant potentially dangerous situations - but it does first emit a
> warning when it encounters the [[nodiscard]] itself. Avoiding the latter
> seems easy to me - the below passes testing. Something else?
> Thanks, Paolo.