This is the mail archive of the gcc-bugs@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]

[Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

--- Comment #19 from rusty at rustcorp dot com.au ---
I like WUR as a sanity-check, and it is useful that more and more library
authors are using it (generally quite well).  As Andrew points out, this has
taken 10 years!  The downside is that false positives are becoming more common.

For example, gnulib also includes a routine to handle this, since 2008:

http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/ignore-value.h;h=68521edb38f50cb2230c8560a125864be212db6a;hb=HEAD

I believe that changing conditions call for a re-evaluation.  And yes, I'd like
to see a comment on any cast-to-void, not just for WUR.

Thanks for your patience!


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