diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2004-01-27 22:13:28 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2004-01-27 22:13:28 +0000 |
commit | 9a1564bb251c2b31f1fd519eac22485f0a2d181a (patch) | |
tree | 386ab249f01a0467835792cc7978fb6cc09d17e2 /gcc/testsuite | |
parent | 2d9db8eb8d7554a60095e61841216031fa2c6174 (diff) | |
download | gcc-9a1564bb251c2b31f1fd519eac22485f0a2d181a.zip gcc-9a1564bb251c2b31f1fd519eac22485f0a2d181a.tar.gz gcc-9a1564bb251c2b31f1fd519eac22485f0a2d181a.tar.bz2 |
call-super-2.m: Make LP64-safe.
* objc.dg/call-super-2.m: Make LP64-safe.
* objc.dg/desig-init-1.m: Likewise.
From-SVN: r76753
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/call-super-2.m | 34 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/desig-init-1.m | 2 |
3 files changed, 23 insertions, 18 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 53070cc..81e8392 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * objc.dg/call-super-2.m: Make LP64-safe. + * objc.dg/desig-init-1.m: Likewise. + 2004-01-27 Devang Patel <dpatel@apple.com> * g++.dg/debug/namespace1.C: New test. diff --git a/gcc/testsuite/objc.dg/call-super-2.m b/gcc/testsuite/objc.dg/call-super-2.m index cd7db41..08eb4bd 100644 --- a/gcc/testsuite/objc.dg/call-super-2.m +++ b/gcc/testsuite/objc.dg/call-super-2.m @@ -44,11 +44,11 @@ @implementation Derived + (int) class_func1 { - int i = (int)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */ + int i = (size_t)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 47 } */ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 47 } */ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 47 } */ - return i + (int)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */ + return i + (size_t)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */ } + (int) class_func2 { @@ -65,12 +65,12 @@ } + (int) class_func5 { - int i = (int)[Derived class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */ - return i + (int)[Object class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */ + int i = (size_t)[Derived class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */ + return i + (size_t)[Object class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */ } + (int) class_func6 { - return (int)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */ + return (size_t)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */ } + (int) class_func7 { @@ -78,8 +78,8 @@ } - (int) instance_func1 { - int i = (int)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */ - return i + (int)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */ + int i = (size_t)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */ + return i + (size_t)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */ } - (int) instance_func2 { @@ -95,12 +95,12 @@ } - (int) instance_func5 { - int i = (int)[Derived instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+instance_func1." } */ - return i + (int)[Object instance_func1]; /* { dg-warning ".Object. may not respond to .\\+instance_func1." } */ + int i = (size_t)[Derived instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+instance_func1." } */ + return i + (size_t)[Object instance_func1]; /* { dg-warning ".Object. may not respond to .\\+instance_func1." } */ } - (int) instance_func6 { - return (int)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */ + return (size_t)[OBJC_GETCLASS("Object") class_func1]; /* { dg-warning ".Object. may not respond to .\\+class_func1." } */ } - (int) instance_func7 { @@ -111,11 +111,11 @@ @implementation Derived (Categ) + (int) categ_class_func1 { - int i = (int)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */ + int i = (size_t)[self class_func0]; /* { dg-warning ".Derived. may not respond to .\\+class_func0." } */ i += [self class_func1]; i += [self categ_class_func2]; - i += (int)[self categ_instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+categ_instance_func1." } */ - return i + (int)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */ + i += (size_t)[self categ_instance_func1]; /* { dg-warning ".Derived. may not respond to .\\+categ_instance_func1." } */ + return i + (size_t)[super class_func0]; /* { dg-warning ".Object. may not respond to .\\+class_func0." } */ } + (int) categ_class_func2 { @@ -124,13 +124,13 @@ } - (int) categ_instance_func1 { - int i = (int)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */ + int i = (size_t)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */ i += [(Derived <Func> *)self categ_instance_func2]; - i += (int)[(Object <Func> *)self categ_instance_func2]; /* { dg-warning ".Object. may not respond to .\\-categ_instance_func2." } */ + i += (size_t)[(Object <Func> *)self categ_instance_func2]; /* { dg-warning ".Object. may not respond to .\\-categ_instance_func2." } */ /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" "" { target *-*-* } 129 } */ - i += (int)[(id <Func>)self categ_instance_func2]; /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" } */ + i += (size_t)[(id <Func>)self categ_instance_func2]; /* { dg-warning ".\\-categ_instance_func2. not implemented by protocol" } */ i += [(id)self categ_instance_func2]; - return i + (int)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */ + return i + (size_t)[super instance_func0]; /* { dg-warning ".Object. may not respond to .\\-instance_func0." } */ } - (int) categ_instance_func2 { diff --git a/gcc/testsuite/objc.dg/desig-init-1.m b/gcc/testsuite/objc.dg/desig-init-1.m index 44abe44..cd56324 100644 --- a/gcc/testsuite/objc.dg/desig-init-1.m +++ b/gcc/testsuite/objc.dg/desig-init-1.m @@ -22,7 +22,7 @@ 0, [Cls meth1], [2 + 1] = 3, - [2 * 2 ... 5] = (int)[0 meth2], /* { dg-warning "invalid receiver type" } */ + [2 * 2 ... 5] = (size_t)[0 meth2], /* { dg-warning "invalid receiver type" } */ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */ |