Hi,
Hackerlab and tla extensively use pointers to `t_uchar' to represent
strings. However, `t_uchar' is different from `char' and unfortunately
C strings are of type pointer to `char' (not `signed char' nor `unsigned
char'). Therefore, we may get warnings such as "pointer targets differ
in signedness" (I do get them on PPC with GCC 4).
>From the GCC 4 manual:
`-funsigned-char'
Let the type `char' be unsigned, like `unsigned char'.
Each kind of machine has a default for what `char' should be. It
is either like `unsigned char' by default or like `signed char' by
default.
Ideally, a portable program should always use `signed char' or
`unsigned char' when it depends on the signedness of an object.
But many programs have been written to use plain `char' and expect
it to be signed, or expect it to be unsigned, depending on the
machines they were written for. This option, and its inverse, let
you make such a program work with the opposite default.
The type `char' is always a distinct type from each of `signed
char' or `unsigned char', even though its behavior is always just
like one of those two.
So I believe we should explicitly compile with `-funsigned-char'.
Thanks,
Ludovic.
_______________________________________________
Gnu-arch-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-arch-users
GNU arch home page:
http://savannah.gnu.org/projects/gnu-arch/