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/60103] Spurious -Wsequence-point warning with -O1


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-10
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think the warning isn't spurious and should be output even with -O0.  But the
fact that we output the warning with -O is IMHO pure coincidence, we do it only
because we fold away the useless || 0.  So the bug is probably in
verify_sequence_points.

Note that C11 still has the notion of sequence point; it's C++11 where it was
renamed to sequenced after/before.


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