This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] Do not warn about [[nodiscard]] applied to a constructor


OK.

On Thu, Aug 1, 2019 at 12:36 PM Paolo Carlini <paolo.carlini@oracle.com> wrote:
>
> Hi,
>
> 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.
>
> ///////////////////
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]