[Patch]: more fixes for encode-[2-4].m testcases
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Feb 4 13:54:00 GMT 2004
> From: Jim Wilson <wilson@specifixinc.com>
>
> On Sun, 2004-02-01 at 18:32, Kaveh R. Ghazi wrote:
> > * objc.dg/encode-2.m, objc.dg/encode-3.m, objc.dg/encode-4.m: Fix
> > tests for systems where `char' is unsigned by default.
>
> OK.
>
> I don't fully understand what the patch does, but it makes testsuite
> failures go away, so it must be good.
Thanks installed.
My apologies if I didn't explain myself well enough. Let me try
again.
The issue I had was that I was experiencing a difference between the
actual encoding as generated by objc-act.c:encode_type() and the
expected encoding string as written into the sscanf pattern in the
testcases.
This occured because the testcases encoded a plain char and assumed
that char is signed, thus they were expecting the encoding for a
signed char which was 'c'. Since on irix plain char is unsigned by
default, I was getting the encoding for unsigned char which was 'C' in
the encoding string and the testcases failed.
The fix simply made the signed-ness explicit to avoid the problem and
always generate a 'c' encoding regardless of what the underlying
system's default signed-ness for plain char is.
Regards,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu
More information about the Gcc-patches
mailing list