Re: Question about genassym, locore.s and 0-sizedarrays(showstopper for an icc compiled kernel)

From: Terry Lambert <tlambert2_at_mindspring.com>
Date: Fri, 05 Sep 2003 01:23:27 -0700
Alexander Leidinger wrote:
> Dan Nelson <dnelson_at_allantgroup.com> wrote:
> > If you're talking FreeBSD 5, you should be able to simply subsitute a
> > C99 "flexible array member" (basically replace "[0]" with "[]") and get
> > the same effect.  0-length arrays are a gcc extension:
> >
> > http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
> >
> > Under FreeBSD 4.x, you can't use them because gcc 2.95 only supports
> > the gcc extension.  Intel has added support for a lot of gcc extensions
> > recently; they may be willing to add this to the list.
> 
> Please read my mail again, icc already supports my_array[0], but the
> resulting array in the binary has size '1'. The actual showstopper is
> the output of genassym.sh. To me it seems it's just a genassym.sh issue,
> but I don't really know what's going on in the kernel, so I ask here.

The ICC is wrong.  If they are supporting a GNU extension, they
must do it the same way GNU does it, to actually be supporting
it.

The main issue here is that any reader of the object file, not
just genassym.sh, will be unable to differentiate [0] vs. [1].

What does ICC do for "[]"?  Is it '1' also, or is it '0', like
it's supposed to be?

I, for one, would not be unhappy to see the GCC-ism fade into
history.

-- Terry
Received on Thu Sep 04 2003 - 23:25:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC