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


On 12/22/2016 03:29 PM, Tom Tromey wrote:

> 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++?

According to:

 https://gcc.gnu.org/projects/cxx-status.html

that could be checked with __has_cpp_attribute(nodiscard).

>From that page, seems like G++ 4.8 had an [[gnu::warn_unused_result]]
alternative that perhaps works on C++11 too.  I have no experience
with it though.

But as I said, we can always add this later.

Thanks,
Pedro Alves


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