On Tue, 7 Nov 2000, Giorgos Keramidas wrote:
> discovered the following funny thing about -Wconversion and umask(2),
I spent quite a while trying to silence that warning in one of my programs
the otherday but I decided it was probably harmless and left it.
> and vice versa, and conversions changing the width or signedness
> of a fixed point argument except when the same as the default
> promotion.
I think this is what we are hitting. From memory mode_t is a
u_int16_t. When you pass 0 (a 32 bit number) it gets cast to a 16 bit
number (change of width) and so produces the warning.
I think the reason that the cast doesn't help (or passing a u_int16_t) is
that when the 16 bit number gets passed it has to be placed on the 32 bit
stack which promotes it so you will always end up with a demotion when
the number is taken from the stack and given to umaks as a 16 bit int.
OTH I could be wrong :-) I haven't looked at the gcc source.
Andrew
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message