Re: [PATCH] system: Add WARN_UNUSED_RESULT

2020-11-12 Thread Jason Merrill via Gcc-patches
On 11/11/20 10:03 PM, Marek Polacek wrote: I'd like to have the option of marking functions with __attribute__ ((__warn_unused_result__)), so this patch adds a macro. And use it for maybe_wrap_with_location, it's always a bug if the return value is not used, which happened to me and got me

[PATCH] system: Add WARN_UNUSED_RESULT

2020-11-11 Thread Marek Polacek via Gcc-patches
I'd like to have the option of marking functions with __attribute__ ((__warn_unused_result__)), so this patch adds a macro. And use it for maybe_wrap_with_location, it's always a bug if the return value is not used, which happened to me and got me confused. Bootstrapped/regtested on