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]

Re: Further observations regarding alloca on i586-pc-linux-gnu


On Sat, Aug 22, 1998 at 07:24:11PM +0200, Carlo Wood wrote:
> ???     pushl $10		# put '\n' on the stack
>         addl $-20,%esp		# allocate 20 bytes on the stack
[...]
> In other words: This is a bug.

This is well known.  What is not clear to me though, is whether
it is a bug in the compiler or in the test. 

The test is effectively relying on the order in which arguments
are evaluated, which is wrong.  Note that the exact same effect
would happen if alloca was not a builtin.  Note that if you mind
sequence points like you ought, you get correct results.


r~


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