Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2002 13:53:29 +0100
From:      Tony Finch <dot@dotat.at>
To:        Juli Mallett <jmallett@FreeBSD.org>
Cc:        John Baldwin <jhb@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/gen siglist.c
Message-ID:  <20020910135329.D14317@chiark.greenend.org.uk>
In-Reply-To: <20020909195303.B752@FreeBSD.org>; from jmallett@FreeBSD.org on Mon, Sep 09, 2002 at 07:53:03PM -0700
References:  <200209070814.g878EJkp040135@freefall.freebsd.org> <XFMail.20020909154001.jhb@FreeBSD.org> <20020909195303.B752@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 09, 2002 at 07:53:03PM -0700, Juli Mallett wrote:
> John Baldwin <jhb@FreeBSD.org> wrote:
> > On 07-Sep-2002 Juli Mallett wrote:
> > > 
> > >   Two arrays were born from the same seeds, both grew into complementary sets
> > >   of pointers to strings.  These two arrays were fixed to the same size, but one
> > >   had an implicit zeroed trailer element, which was unused because the size was
> > >   used up by the ones before said zeroed trailer element.  So the unused limb was
> > >   chopped off the over-sized-but-not-over-sized array, and everyone lived happily
> > >   ever after.
> > 
> > What does this mean in practical terms?
> 
> I removed a comma.

A trailing comma does not imply an extra zero element in the initializer.
For example,

	char a[] = {0}, b[] = {0,};
	assert(sizeof(a) == sizeof(b));

Tony.
-- 
f.a.n.finch <dot@dotat.at> http://dotat.at/
GERMAN BIGHT: NORTHWEST VEERING EAST 4 OR 5, OCCASIONALLY 6. RAIN OR THUNDERY
SHOWERS. MODERATE OR GOOD.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020910135329.D14317>