This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13321] sizeof of an array argument will always return 4
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2003 21:44:43 -0000
- Subject: [Bug c/13321] sizeof of an array argument will always return 4
- References: <20031205203625.13321.Stefani@Seibold.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2003-12-05 21:44 -------
Subject: Re: sizeof of an array argument will always return 4
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Not a bug, the sizeof an array argument is the same as the sizeof a pointer.
The resolution is right, but I don't think the justification is good.
When a function parameter is declared as array, it its type gets
adjusted to a pointer type (as part of the function's type
adjustement).
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13321