http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56289

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-04-19
                 CC|                            |manu at gcc dot gnu.org
            Summary|Bad unused value warning    |Bad location for unused
                   |with comma operator         |value warning with comma
                   |                            |operator
     Ever Confirmed|0                           |1

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-19 
16:49:44 UTC ---
The location could be better but it is pretty close for C++:

test.c:4:14: warning: right operand of comma operator has no effect
[-Wunused-value]
   (void) x, y; /* warning: right operand of comma operator has no effect
              ^

But the C FE is pretty awful:

test.c:4:3: warning: statement with no effect [-Wunused-value]
   (void) x, y; /* warning: right operand of comma operator has no effect
   ^

Clang:

test.c:4:13: warning: expression result unused [-Wunused-value]
  (void) x, y; /* warning: right operand of comma operator has no effect
            ^

Reply via email to