Re: [OT] Re: Bug#169450: wrong assumption on char signedness
On 18-Nov-02, 15:37 (CST), Andreas Rottmann <a.rottmann@gmx.at> wrote:
> "H. S. Teoh" <hsteoh@quickfur.yi.org> writes:
> from glib/gtypes.h:
>
> ------<snip>--------
> typedef char gchar;
>
> typedef unsigned char guchar;
> ------<snap>--------
>
> So gchar is supposed to behave exactly like char.
Which means that smurf needs to decide what it wants: a char variable or
a variable capable of holding (small?) positive and negative integers.
The two concepts are not interchangeable. Unless there are real memory
limits involved, just declare the damned thing 'int' and be happy. Or,
stop trying to store negative values in char, that's not what it's for.
Steve
--
Steve Greenland
The irony is that Bill Gates claims to be making a stable operating
system and Linus Torvalds claims to be trying to take over the
world. -- seen on the net
Reply to: