https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125451

--- Comment #18 from Thomas Wolff <towo at computer dot org> ---
This issue can be close. It will be fixed in the cygwin implementation.
I'm still wondering though why gcc bit-extends a 16 bit parameter at all
(whether signed or unsigned), also

> > And if it does so, beyond the width specified in the include file, it should
> > respect the unsignedness of the parameter type, I think. Why got this
> > changed in the first place?
> 
> Because before GCC 16, GCC was actually doing a promotion to int 
> (on accident due to defines) and that introduced so many differences 
> between x86 and other targets and it was just fixed up to follow the ABI. 

Since the ABI is assumed to be 16 bit (by header file), there is nothing in the
upper bits to follow it. If the upper bits were left random, even the bug might
have become apparent earlier...
Thanks

Reply via email to