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] |
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. ///////////////////
Attachment:
CL_nodiscard
Description: Text document
Attachment:
patch_nodiscard
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |