This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]: more fixes for encode-[2-4].m testcases

 > From: Jim Wilson <>
 > 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

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

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.

Kaveh R. Ghazi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]