aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-10-08 08:00:08 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-10-11 15:42:23 +0100
commitb292746ff7cfe708d3311ea41242c44ccbbe2693 (patch)
tree88197d520697738d3377014ad8631e7e61f48763
parentb1b7599ca52f3ba94deea842c80286194d516210 (diff)
downloadgcc-b292746ff7cfe708d3311ea41242c44ccbbe2693.zip
gcc-b292746ff7cfe708d3311ea41242c44ccbbe2693.tar.gz
gcc-b292746ff7cfe708d3311ea41242c44ccbbe2693.tar.bz2
testsuite, Objective-C : Fix call-super-2.m for newer NeXT headers.
We were using a callout to runtime.h which, eventually brings in the system runtime.h. One newer versions of the Darwin/NeXT headers this declares the objc_getClass() function as returning Class, rather than the internal representation of that. This breaks a fragile assumption in objc-act that the use of these internal functions can be deduced by looking at the function type. Ultimately, the fragility should be fixed - but this fixes up the test so that it only uses the compiler's forward declaration of the function. gcc/testsuite/ChangeLog: * objc.dg/call-super-2.m: Remove inclusion of runtime.h. Add a FIXME about the test portability.
-rw-r--r--gcc/testsuite/objc.dg/call-super-2.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/testsuite/objc.dg/call-super-2.m b/gcc/testsuite/objc.dg/call-super-2.m
index 0a3765f..836cad9 100644
--- a/gcc/testsuite/objc.dg/call-super-2.m
+++ b/gcc/testsuite/objc.dg/call-super-2.m
@@ -3,7 +3,8 @@
/* { dg-do compile } */
#include "../objc-obj-c++-shared/TestsuiteObject.h"
-#include "../objc-obj-c++-shared/runtime.h"
+/* NOTE: we are relying on the built-in type for objc_getClass being used
+ rather than the one that might come from including <objc/runtime.h>. */
#include <stddef.h>
/* FIXME: This is temporary. At the moment, the compiler, when
@@ -14,6 +15,9 @@
# define objc_getClass(C) objc_get_class(C)
#endif
+/* FIXME: casting of super is not permitted by clang, so that many of the
+ tests here are testing non-portable code. */
+
@protocol Func
+ (int) class_func0;
- (int) instance_func0;