Date: Mon, 13 Sep 2004 09:00:49 GMT From: Giorgos Keramidas <keramida@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code Message-ID: <200409130900.i8D90nrV034349@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/71628; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: Dima Dorfman <dd@freebsd.org> Cc: Dan Lukes <dan@obluda.cz>, 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 <dd@freebsd.org> wrote: > Dan Lukes <dan@obluda.cz> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409130900.i8D90nrV034349>