This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- From: "peter_e at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 May 2014 20:19:48 +0000
- Subject: [Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- Auto-submitted: auto-generated
- References: <bug-61081-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081
--- Comment #6 from Peter Eisentraut <peter_e at gmx dot net> ---
This particular case is in system headers, but there are other cases that are
not, so this isn't going to help in general.
I think this is a legitimate way to write a function-like macro that has a
side-effect and a return value, and the warning is bogus.