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

2015-08-19 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #22 from Filipe Brandenburger --- (In reply to Jan Engelhardt from comment #20) > Seems like the short route is to add a new attribute > ((warn_unused_result_with_void_cancelling)) that exhibits the "desired" > behavior of (void) canc

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

2015-06-11 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #17 from Filipe Brandenburger --- To make matters even worse, gcc doesn't even seem to be consistent with itself, because in other situations it *does* accept a cast to void to silent warnings. For example, -Wunused-but-set-variable

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

2015-06-11 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #12 from Filipe Brandenburger --- (In reply to Manuel López-Ibáñez from comment #11) > Neither Andrew nor me nor other people that may comment here have the power > to approve or reject this change. Great, so please don't preemptivel

[Bug c/25509] can't disable __attribute__((warn_unused_result))

2015-06-11 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 --- Comment #35 from Filipe Brandenburger --- (In reply to Manuel López-Ibáñez from comments) Don't worry, I got what you mean... Though I don't think coming up with code to fix it is the issue here, in comment #10 a patch was provided (which a

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

2015-06-10 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #9 from Filipe Brandenburger --- Or, conversely, please explain to me how changing the behavior (to allow a void-cast to silent the warning on a call to a warn_unused_result function) would actually affect anyone today... If it's a p

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

2015-06-10 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #8 from Filipe Brandenburger --- (In reply to Andrew Pinski from comment #7) > Again this has nothing to do with other lints, this attribute was designed > so you can't ignore the return value. I obviously *can* ignore the return val

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

2015-06-10 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #6 from Filipe Brandenburger --- Then please explain to me how this: (void) foo(); is any worse than this: int ignored __attribute__((unused)); ignored = foo(); /* do nothing with ignored here */ You can force me to assign

[Bug c/25509] can't disable __attribute__((warn_unused_result))

2015-06-10 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 Filipe Brandenburger changed: What|Removed |Added CC||filbranden at google dot com

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

2015-06-10 Thread filbranden at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 Filipe Brandenburger changed: What|Removed |Added CC||filbranden at google dot com