From c85a3379bb8164ba724f1bdf9340813fb25adccc Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 4 Feb 2004 13:40:25 +0000 Subject: [PATCH] encode-2.m, [...]: Fix tests for systems where `char' is unsigned by default. * 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. From-SVN: r77247 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/objc.dg/encode-2.m | 4 ++-- gcc/testsuite/objc.dg/encode-3.m | 2 +- gcc/testsuite/objc.dg/encode-4.m | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 21af2894711..7286a0f8728 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-02-04 Kaveh R. Ghazi + + * 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. + 2003-02-04 Giovanni Bajo PR c++/13997 diff --git a/gcc/testsuite/objc.dg/encode-2.m b/gcc/testsuite/objc.dg/encode-2.m index b0899270f7f..b9003696c02 100644 --- a/gcc/testsuite/objc.dg/encode-2.m +++ b/gcc/testsuite/objc.dg/encode-2.m @@ -39,7 +39,7 @@ typedef struct { float x, y; } XXPoint; typedef struct { float width, height; } XXSize; typedef struct _XXRect { XXPoint origin; XXSize size; } XXRect; -(id)setRect:(XXRect)r withInt:(int)i; --(void) char:(char)c float:(float)f double:(double)d long:(long)l; +-(void) char:(signed char)c float:(float)f double:(double)d long:(long)l; @end XXRect my_rect; @@ -57,7 +57,7 @@ unsigned offs1, offs2, offs3, offs4, offs5, offs6, offs7; CHECK_IF(offs == offs1); return nil; } --(void) char:(char)c float:(float)f double:(double)d long:(long)l { +-(void) char:(signed char)c float:(float)f double:(double)d long:(long)l { unsigned offs = sizeof(self); CHECK_IF(offs == offs3); offs += sizeof(_cmd); diff --git a/gcc/testsuite/objc.dg/encode-3.m b/gcc/testsuite/objc.dg/encode-3.m index d32ab729ba1..20a85b43bdf 100644 --- a/gcc/testsuite/objc.dg/encode-3.m +++ b/gcc/testsuite/objc.dg/encode-3.m @@ -28,7 +28,7 @@ union __XXAngle { unsigned int alpha, beta; }; typedef struct { float x, y; union __XXAngle a; } XXPoint; typedef struct { double width, height; } XXSize; typedef struct _XXRect { XXPoint origin; XXSize size; struct _XXRect *next; } XXRect; -- (void) char:(char)c float:(float)f double:(double)d unsigned:(unsigned)u short:(short)s long:(long)l; +- (void) char:(signed char)c float:(float)f double:(double)d unsigned:(unsigned)u short:(short)s long:(long)l; - (void *)setRect:(XXRect)r withBool:(ProtoBool)b withInt:(int)i; + (Enum *)getEnum:(XXPoint *)pt enum:(enum Enum)e bool:(ObjCBool)b; + (ProtoBool **)getBool:(ObjCBool **)b; diff --git a/gcc/testsuite/objc.dg/encode-4.m b/gcc/testsuite/objc.dg/encode-4.m index 1f179e1dad5..a754c6955cb 100644 --- a/gcc/testsuite/objc.dg/encode-4.m +++ b/gcc/testsuite/objc.dg/encode-4.m @@ -31,7 +31,7 @@ struct Nested { }; @interface Int1: Object { - char a, b; + signed char a, b; Int2 *int2; struct Nested nested; }