Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Sep 2003 02:06:56 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        current@freebsd.org
Subject:   Re: Question about genassym, locore.s and 0-sizedarrays(showstopperfor   an icc compiled kernel)
Message-ID:  <3F585230.6868CB64@mindspring.com>
References:  <20030904180448.021a1b6b.Alexander@Leidinger.net> <20030904162858.GI98381@dan.emsphone.com> <20030905001411.3a9030b3.Alexander@Leidinger.net> <20030904225123.GB39916@dan.emsphone.com> <20030905105507.51ba3183.Alexander@Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Leidinger wrote:
> On Fri, 05 Sep 2003 01:38:29 -0700
> Terry Lambert <tlambert2@mindspring.com> wrote:
> > Dan Nelson wrote:
> > > I guess the correct question to be asking is "does the ELF format allow
> > > 0-length symbols?"
> >
> > It does, according to my reading of it.  They may have an issue with
> > dead code removal or element aliasing.  The way to find out would be
> > to see what they emit for "[]"... 0 lenth, or 1?
> 
> % <icc.c
> char array[];
> 
> % nm icc.o
> 00000001 C array

Now try:

	struct foo {
		char c;
		int i;
		long array[];
	};

	struct foo foo;m
	struct foo fee[1];
	struct foo fie[3];
	struct foo foe[0];
	struct foo fum[1];

on both compilers.  If they end up the same, then Intel needs to
change to using the 0.  If they end up different, then they are
broken relative to the C99 standard and zero length arrays a final
elements in structures.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F585230.6868CB64>