This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: question about allocating local variable
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Prawit Chaivong <arsenal_pui at yahoo dot com>, gcc-help at gcc dot gnu dot org
- Date: Mon, 28 Jun 2004 10:50:13 -0500
- Subject: Re: question about allocating local variable
- References: <20040628152711.18563.qmail@web60507.mail.yahoo.com>
Hi Prawit,
>Does anybody has any explaination [why the compiler allocates more than
specified]?
Alignment.
You didn't specify what platform, GCC version (3.3.4? 3.4.0?), and compile
options you are using. If you are not generated optimized code, the code
may not be optimized.
It is also possible that one of the GCC Gnurus made a boo-boo. Rare, but
can happen. Especially between optimizations that are in contention, which
may have unintended side-effects on different platforms. (I discovered 3
such issues, on GCC 2.95 on Solaris. They're all fixed now.)
HTH,
--Eljay