Subject: Re: Style guide
To: None <current-users@NetBSD.ORG>
From: None <is@Beverly.Rhein.DE>
List: current-users
Date: 06/19/1997 00:04:15
Giles Lean ( wrote:
: The concerns here are valid, but practically theoretical.  I've never
: seen a type promotion bug actually cause damage.  Do people actually
: see such problems "in the field"?

Ever tried to incorrectly promote a char to an int on a big endian machine?

For a historical remark, a couple of FORTRAN programs which were running
for years on VAXen, which passed INTEGER*4 to functions expecting
INTEGER*2 parameters, mysteriously started to break when compiling and
running them on the big-endian Convex C1 that MPIfR had aquired.

This is exactly the kind of problem you'll see when not promoting char
to int, where the callee expectis it promoted, on big endian. 

On little endian, you might get away... IF the call stack is rounded to
ints anyway.

On machines which pass params in registers, youre ok