Subject: Re: Style guide
To: None <current-users@NetBSD.ORG>
From: None <is@Beverly.Rhein.DE>
Date: 06/21/1997 23:15:35
Dennis Ferguson (firstname.lastname@example.org) wrote:
: > 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.
: No, different bug. FORTRAN compilers (at least last time I wrote a FORTRAN
: program, long ago) generally pass parameters by reference since modification
Yes, I know. Its defined so by the language standard, and abused by FORTRAN
programmers in many ways.
Those bugs will only affect one parameter for FORTRAN, while they might
shift all preceding (succeeding) parameters by 2 or 3 bytes (for 32bit
machines) for C, additionally (depends on wether the argument stack is
defined to be always aligned to some value). Otherwise, they are very
similar, IMO, but I wont start a fight over this...