-fsigned-char on all arches
David Daney
ddaney at avtrex.com
Fri Apr 13 16:36:56 UTC 2007
Bernd Schmidt wrote:
> Will Newton wrote:
>> On 4/13/07, Dave Dodge <dododge at dododge.net> wrote:
>>> On Fri, Apr 13, 2007 at 12:29:53PM +0100, Will Newton wrote:
>>>> Is there a reason why signed char has been made the default rather
>>>> than unsigned char? Because i386 is signed?
>>> I assume it's just following the System V ABI for i386, which states
>>> that plain char corresponds to a signed byte. This choice probably
>>> dates back to Xenix in the mid 1980s.
>> The uClibc build process unconditionally passes gcc -fsigned-char on
>> all architectures. I don't think it's the correct choice and will lead
>> to suboptimal code generation on some platforms.
>
> It also strikes me as exceedingly odd, and dangerous. For example, any
> macros defined in uClibc header files could have different behaviour
> depending on whether they are used in uClibc or in an application.
I whole heartedly agree.
Using hacky compiler switch foo to paper over incorrect code in the
library seems short sighted and risky.
David Daney
More information about the uClibc
mailing list