This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sizeof() function parameter array: known problem?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]