Date: Sat, 29 Jun 2013 20:27:19 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: mdf@FreeBSD.org Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Tim Kientzle <kientzle@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r252376 - head/lib/libutil Message-ID: <20130629172719.GE91021@kib.kiev.ua> In-Reply-To: <CAMBSHm_%2BYwAp2egVZefBar_V6acC4erMm3LyTj62KFxHPunCgQ@mail.gmail.com> References: <201306291552.r5TFqnLV022460@svn.freebsd.org> <20130629161914.GD91021@kib.kiev.ua> <A89C1472-264E-4B9C-8711-763ED156E9D2@FreeBSD.org> <CAMBSHm_%2BYwAp2egVZefBar_V6acC4erMm3LyTj62KFxHPunCgQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--p/BTpMpkkGj+ZR7l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 29, 2013 at 09:42:49AM -0700, mdf@FreeBSD.org wrote: > On Sat, Jun 29, 2013 at 9:36 AM, Tim Kientzle <kientzle@freebsd.org> wrot= e: >=20 > > > > 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 prob= lem > > > 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 separa= ted > > > 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). > > >=20 > It may be like other warnings (-Wmissing-field-initializers, I'm looking = at > you) that warn about currently correct, but potentially problematic > behavior. >=20 > 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 auth= or > 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. --p/BTpMpkkGj+ZR7l Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJRzxj3AAoJEJDCuSvBvK1Bmx0P/iuOkz0S+1o7GPduiZ1sdEeD xzvTbdZ98hFfN/3qn32tGwapuaj61sFut0TH/WcYU4a0/j3NVPRtFeZcRDpWAf5b VEZmvSZW7IwQxsa9DtFygTu9zpgJiArG10/ImfkR4RLITbFCwDmd8I32lxPQJZWZ WKJnvv8Ap187IfnF5nteo41eaTod8FhkWYkH9eeu2WYzDidJCoYKRJ3jFAEx3L6j NYCQYRmqKlwqmBXWeslA1oNB6WtCMCDiJhmVgcYiSgydtODT0a9JRziG5EXMUDb1 eCe4YIRJIdfKqC1Tbls08fsSdXk4C0TnIhmt4DKvBmwMIG6hekZR8aVx8DzSl4/9 xYdT98Q59zne/fZ5SwwlUgV29tSLaQjnaZpW9Po1fxhwo+fUUjC9HWfk5hdkLilv mXSmgfbPaHyrqIkDLmIblkFTSZug87nksTfEqxiqLXEt+vduGWiG1b+CaDX+zUDk fq88vdJMrVoFWYZMz7neax6uJ9vdx3MReOmDoowg6+jJsyVqY42pJNUDu5D4e/Vp rQkn/IgyR8Khcn5Qh8pnBR7hxpOR5mBLCI1skJ71D6cD4LBJ3HAN6cjHZ4ojMCrs Qchq+g5kLk7nes2uTTrwWkHTfQSq+JB42DIVXZqC57RK2uYcIFP8vb7Q3t2xgmrO sAtoAIlSyKToXLFytnTH =FA7y -----END PGP SIGNATURE----- --p/BTpMpkkGj+ZR7l--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130629172719.GE91021>