This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFA 7/8] Use unique_xmalloc_ptr in execute_gdb_command


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>> It looks like the accepted fix upstream to use the C++17 [[nodiscard]]
>> attribute; not sure if we can use that somehow.

Pedro> Can't see why not, if we put it behind some ATTRIBUTE_NODISCARD or
Pedro> some such define.

It wasn't obvious to me (and as you can tell I'm not doing much research
into this kind of thing lately...) what condition to use.  C++17 isn't
official yet, and presumably even if we had some value for __cplusplus
to check, we'd also have to check for when exactly it was added to g++?

Tom


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