Subject: Re: example for k&r being bad
To: Hubert Feyrer <>
From: Roland Illig <>
List: tech-userlevel
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
> [1], output on ILP32 (NetBSD/i386) is in [2], output on LP64
> (NetBSD/alpha) is in [3]. 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?