sizeof() function parameter array: known problem?

Andrew Haley aph@redhat.com
Fri Jul 1 09:17:00 GMT 2005


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.



More information about the Gcc mailing list