This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof bug
- To: James Nicolson <james at itixs dot com>
- Subject: Re: sizeof bug
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 15 Sep 1999 23:34:29 -0300
- Cc: egcs-bugs at egcs dot cygnus dot com
- References: <37E0434A.C106C577@itixs.com>
On Sep 15, 1999, James Nicolson <james@itixs.com> wrote:
> This is some weird interaction between typedef, sizeof, and argument
> passing. I would expect all the sizeofs to return 16, but mysteriously
> it returns 4 in one case.
That's because array arguments decay to pointers. The signature of
foo is `void foo(unsigned char *)'.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them