aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2004-02-04 13:40:25 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2004-02-04 13:40:25 +0000
commitc85a3379bb8164ba724f1bdf9340813fb25adccc (patch)
tree62e5c55892d9f07dbfef0ee3d387ef58885ae81e
parentdd292d0ad8022964b57aba763b9abce9564ac14f (diff)
downloadgcc-c85a3379bb8164ba724f1bdf9340813fb25adccc.zip
gcc-c85a3379bb8164ba724f1bdf9340813fb25adccc.tar.gz
gcc-c85a3379bb8164ba724f1bdf9340813fb25adccc.tar.bz2
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
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/objc.dg/encode-2.m4
-rw-r--r--gcc/testsuite/objc.dg/encode-3.m2
-rw-r--r--gcc/testsuite/objc.dg/encode-4.m2
4 files changed, 9 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 21af289..7286a0f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * 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 <giovannibajo@gcc.gnu.org>
PR c++/13997
diff --git a/gcc/testsuite/objc.dg/encode-2.m b/gcc/testsuite/objc.dg/encode-2.m
index b089927..b900369 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 d32ab72..20a85b4 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 1f179e1..a754c69 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;
}