This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59871] [4.7/4.8/4.9 Regression] No unused value warning for comma expression
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Jan 2014 10:08:53 +0000
- Subject: [Bug c/59871] [4.7/4.8/4.9 Regression] No unused value warning for comma expression
- Auto-submitted: auto-generated
- References: <bug-59871-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59871
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'd say easiest would be at the spot where we warn currently about the
left-hand ... check if the left hand operand is a COMPOUND_EXPR, in that case
find the rightmost operand of all the nested COMPOUND_EXPRs and complain about
right-hand operand instead of left-hand. Perhaps needs some tweaks to get the
locus right.