Subject: Re: Why does mode_t need 32 bits?
To: Gordon W. Ross <gwr@mc.com>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: tech-kern
Date: 10/30/1997 13:05:00
> It looks to me like we should have fixed lint so it knows
> about such type promotions (or can be told about them).
> Changing the system to satisfy a lame tool is bogus.
However, fixing the system so that it isn't broken isn't bogus.
That was the problem: the system was broken.
For instance, consider:
int foo(mode_t);
If mode_t is a short, that means that the argument promotion of:
foo(x);
is potentially different depending on whether or not the prototype is
in scope.
In fact, the kernel was assuming promotion to 'int', but that
promotion wasn't guaranteed if the prototype was used. _that_ was
what was broken, and it did need fixing.
cgd