This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Use of VLA in struct in gcc-torture/execute/20020412-1.c
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: dje at watson dot ibm dot com, gcc at gcc dot gnu dot org
- Date: Mon, 9 Sep 2002 00:55:10 -0400 (EDT)
- Subject: Re: Use of VLA in struct in gcc-torture/execute/20020412-1.c
> On Sun, Sep 08, 2002 at 03:14:02PM -0400, John David Anglin wrote:
> > Another question, what should FUNCTION_ARG do about arguments that have
> > a zero size (e.g., an empty struct, another GCC extension)?
>
> A _fixed_ size zero? I think we're supposed to treat
> that as a struct of size one. Look at x86 output to be sure.
Ok, I tried compile/zero-strct-1.c with the HP aCC compiler and
it passes the empty struct as a single byte in a general register.
x86 passes them on the stack.
I still don't understand the function of empty structs.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)