On Sat, Jun 29, 2013 at 09:42:49AM -0700, m...@freebsd.org wrote: > On Sat, Jun 29, 2013 at 9:36 AM, Tim Kientzle <kient...@freebsd.org> wrote: > > > > > On Jun 29, 2013, at 9:19 AM, Konstantin Belousov wrote: > > > > > On Sat, Jun 29, 2013 at 03:52:49PM +0000, Tim Kientzle wrote: > > >> Author: kientzle > > >> Date: Sat Jun 29 15:52:48 2013 > > >> New Revision: 252376 > > >> URL: http://svnweb.freebsd.org/changeset/base/252376 > > >> > > >> Log: > > >> Fix -Wunsequenced warning > > > What is this ? From the name of the warning, it sounds as if the problem > > > is in the lack of sequence point between two modifications of the same > > > variable in the expression ? > > > > > > But, there function' argument evaluation and function call are separated > > > by seq point, AFAIR. Could you, please, clarify ? > > > > I think you're right about that, though I'd have to > > look at the spec to be sure. > > > > Not sure why clang would report this as a -Wunsequenced > > warning. The implied store here is certainly redundant, though. Definitily, I said that the changes are good (not bad).
> > > > It may be like other warnings (-Wmissing-field-initializers, I'm looking at > you) that warn about currently correct, but potentially problematic > behavior. > > In particular, if any of the functions is re-implemented as a macro, the > sequence point goes away, and this code is broken without the code's author > having made any changes. So it seems like a reasonable warning. It is only after the functions reimplemented the code would be broken. Right now, it seems that the warning is broken, not code.
pgpYP51gmy6uS.pgp
Description: PGP signature