[RFA 7/8] Use unique_xmalloc_ptr in execute_gdb_command

Pedro Alves palves@redhat.com
Thu Dec 22 15:40:00 GMT 2016


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



More information about the Gdb-patches mailing list