Subject: Re: slightly off topic: [*]
To: Alan Barrett <>
From: Bill Studenmund <>
List: tech-toolchain
Date: 09/23/2005 09:56:09
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 23, 2005 at 04:23:23PM +0200, Alan Barrett wrote:
> On Fri, 23 Sep 2005, Perry E. Metzger wrote:
> > Does this have any semantic distinction from the prototype saying
> >=20
> > int foo(int i, int a[]);
> >=20
> > at all? Compiled code has no way of knowing what the main function
> > might have inside the [] anyway, so it can't behave differently.
> For one-dimensional arrays, it makes no real difference in the caller.
> In the function itself, the compiler could be stricter about subscript
> range checking if the function is defined with
> 	int foo(int i, int a[i]);
> rather than
> 	int foo(int i, int a[]);
> or
> 	int foo(int i, int *a);
> For multi-dimensional arrays, you get syntax errors with "int a[][]",
> and "int **a" is semantically different from a two-dimensional array.

Cool! Finally C can deal with Fortran-style multidimensional arrays (if I=
understand that right).

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)