Parameter Types in Old-Style Function Definitions

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Sep 16 09:59:08 AEST 1990


In article <26564 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
>Note that this problem would not exist, had X3J11 chosen the correct
>(i.e., sign-preserving) extension rules.  [harangue omitted]

Actually the alternative was unsignedness-preserving.  Both sets of
rules had substantial existing practice, and the choice was not at all
easy to make.  In the end, the committee decided that the probability of
programming errors was somewhat greater with the unsignedness-preserving
rules than with value-preserving rules, and that maintaining arithmetic
values would more often be important than maintaining type-unsignedness.

One of the strongest advocates for unsignedness-preserving rules later
did an experiment to determine how much actual existing code would be
affected by the choice, and discovered that the change fixed more bugs
in existing code than it introduced, but much more often it had no effect.
That pretty much confirmed the original committee evaluation.



More information about the Comp.std.c mailing list