From owner-svn-src-all@FreeBSD.ORG Sat Jun 29 16:42:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE6094E8; Sat, 29 Jun 2013 16:42:49 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) by mx1.freebsd.org (Postfix) with ESMTP id 822BE1CAE; Sat, 29 Jun 2013 16:42:49 +0000 (UTC) Received: by mail-ob0-f176.google.com with SMTP id v19so2926232obq.21 for ; Sat, 29 Jun 2013 09:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0G3eJsNnLyC2yQMg2V12tTpNn7CGUP8jyF/rgvtG6FQ=; b=g4k1hwpA6laQjI+CZE3DL1a3+J/0c3qk/Jt+VEovbw0seAIXvInCoTmOO/SEPODmzB NdFp4JjaYbIu8VOqjzemwmGqGPvlMfQzLbziQvfc2vB7yLifhIWLRzXPixsEs6fyaRZh KViCnaednu/GZ+aNGDSFrZNYcQEY0dpyoW1gIEBX3gk34a4QinxTT3Fr6C0Meosux5NO oUcjoomF89sx9w259d3A+NQeLvPqDGdDLx/RGWrUCd7GIrPPeZIK1b8UGwoLoriYMNDK 51lVMSF1xDt+u8etD4Q2UEDT0AciiC9Ns+H+khLK5tpZttViTWSvE1chdKgAD2D3LvlK a1Bw== MIME-Version: 1.0 X-Received: by 10.182.196.1 with SMTP id ii1mr8254494obc.93.1372524169162; Sat, 29 Jun 2013 09:42:49 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.182.165.162 with HTTP; Sat, 29 Jun 2013 09:42:49 -0700 (PDT) In-Reply-To: References: <201306291552.r5TFqnLV022460@svn.freebsd.org> <20130629161914.GD91021@kib.kiev.ua> Date: Sat, 29 Jun 2013 09:42:49 -0700 X-Google-Sender-Auth: uMdLr-ZmvDcSdRK6rBMYK_htbjk Message-ID: Subject: Re: svn commit: r252376 - head/lib/libutil From: mdf@FreeBSD.org To: Tim Kientzle Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 16:42:50 -0000 On Sat, Jun 29, 2013 at 9:36 AM, Tim Kientzle 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. > 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. Thanks, matthew