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/53064] -Wsequence-point behaves inconsistently


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-24 03:51:32 UTC ---
>  a + (++a ? 0 : 0);

Hmm, I don't think there is a sequence point issue here compared to the other
case where it might cause an undefined code.

(++a ? 0 : 0) is all in done in one sequence point so that is defined and then
added to a.  a might be accessed before or after the sequence point where a is
modified but there is a sequence point between the access and the modification.


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