Subject: Re: example for k&r being bad
To: Hubert Feyrer <firstname.lastname@example.org>
From: Roland Illig <rillig@NetBSD.org>
Date: 12/20/2005 10:39:10
Hubert Feyrer wrote:
> I've tried to write a program that shows this, but didn't succeed.
> The program I come up with (based on your description) is available at
> , output on ILP32 (NetBSD/i386) is in , output on LP64
> (NetBSD/alpha) is in . Obviously they are the same, so I must have
> missed something. What is it?
> I think it would be useful to have a smallish piece of code that we can
> point people at and say "look, differences between architectures if you
> use K&R"...
I think you should try separate compilation. In the version you
provided, gcc has lots of chances to cheat, which would be impossible
A second issue is the argument passing ABI. Does the alpha ABI use a
stack for "simple" arguments or are they passed in registers?