This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof() function parameter array: known problem?
- From: Andrew Haley <aph at redhat dot com>
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 1 Jul 2005 10:17:37 +0100
- Subject: Re: sizeof() function parameter array: known problem?
- References: <20050701084519.9199.qmail@web26907.mail.ukl.yahoo.com>
Etienne Lorrain writes:
> The result of this funtion is 1, is there a C lawyer around?
>
> $ cat tmp.c
> unsigned fct (unsigned array[10])
> {
> return sizeof(array) / sizeof(array[0]);
> }
This is 6.7.5.3, Para. 7.
Andrew.