From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 13 09:00:50 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1316F16A4CE for ; Mon, 13 Sep 2004 09:00:50 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0255A43D2F for ; Mon, 13 Sep 2004 09:00:50 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8D90nGk034350 for ; Mon, 13 Sep 2004 09:00:49 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8D90nrV034349; Mon, 13 Sep 2004 09:00:49 GMT (envelope-from gnats) Date: Mon, 13 Sep 2004 09:00:49 GMT Message-Id: <200409130900.i8D90nrV034349@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Subject: Re: bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 09:00:50 -0000 The following reply was made to PR bin/71628; it has been noted by GNATS. From: Giorgos Keramidas To: Dima Dorfman Cc: Dan Lukes , bug-followup@freebsd.org Subject: Re: bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code Date: Mon, 13 Sep 2004 11:58:18 +0300 On 2004-09-13 06:46, Dima Dorfman wrote: > Dan Lukes wrote: > > Dima Dorfman wrote: > > > Any initialization in the form "T v = v" invokes undefined behavior by > > > using the indeterminate value of an object. Eliminating a warning or > > > > Unless compiler documentation say other ... > > The v=v DURING DECLARATION (not later) is special case. > > I looked for such an exception in C99 before my original post, but I > didn't find one. There is a footnote in C99 that I'm a bit worried about. In page 37, a footnote reads: 41) Thus, an automatic variable can be initialized to a trap representation without causing undefined behavior, but the value of the variable cannot be used until a proper value is stored in it. Unless I'm mistaken, this means that the value of `foo' cannot be used in the right part of the following assignment: char *foo = foo; > Do I sound like a pedant yet? ;-) For a while, I was afraid my comments would sound unnecessarily pedantic too. Fortunately, it seems I'm not.