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/52106] [C11] missing -Wunused-but-set-variable warning with the a = b = ... construct


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|warning for useless         |[C11] missing
                   |assignments                 |-Wunused-but-set-variable
                   |                            |warning with the a = b =
                   |                            |... construct

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-03 17:18:13 UTC ---
>  a = b = 0;

In C99 and before is equivalent to b = 0; a = b;
In C11 (which we don't implement this semantics yet), it is a = 0; b = 0;


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