Re: Kill signed chars !!! => PPC uses unsigned chars

From: J.A. Magallon
Date: Tue Jun 21 2005 - 16:28:08 EST

On 06.21, cutaway@xxxxxxxxxxxxx wrote:
> The signedness of 'char' is never certain between compilers. There are x86
> C compilers that implemented 'char' as unsigned, others as signed, and
> others that offered a compile switch to do either way if the default didn't
> work with the code being compiled.
> When it matters, just be explicit :)

It is not a problem about chars signedness (i suppose it depends
on processor ops with bytes, if it uses them as signed or unsiged, do sign
extensions and so on...).

The problem is that a function expecting a 'char' is given a 'signed char'
or 'unsigned char'. Just type the arguments the way they are expected.
On PPC, 'char' argument will be unsigned and 'char' parameter also. What
does strcpy() internally doesn't matter. Fine.

J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.12-jam1 (gcc 4.0.1 (4.0.1-0.2mdk for Mandriva Linux release 2006.0))

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at