76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
AS_IF([test x"$GOBJC" = x"yes"], [
OBJCFLAGS="$OBJCFLAGS -Wall -Werror -Wwrite-strings -Wpointer-arith"
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wcast-align"
AC_MSG_CHECKING(whether -Wcast-align is buggy)
AC_TRY_COMPILE([
#ifdef __has_attribute
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
#endif
@interface Foo
{
struct objc_class *_isa;
}
@end
@implementation Foo
- (void)foo
{
struct objc_class *c = _isa;
(void)c;
}
@end
], [
], [
AC_MSG_RESULT(no)
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS"
])
])
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
AS_IF([test x"$GOBJC" = x"yes"], [
OBJCFLAGS="$OBJCFLAGS -Wall -Werror -Wwrite-strings -Wpointer-arith"
old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wcast-align"
AC_MSG_CHECKING(whether -Wcast-align is buggy)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
#ifdef __has_attribute
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
#endif
@interface Foo
{
struct objc_class *_isa;
}
@end
@implementation Foo
- (void)foo
{
struct objc_class *c = _isa;
(void)c;
}
@end
])
], [
AC_MSG_RESULT(no)
], [
AC_MSG_RESULT(yes)
OBJCFLAGS="$old_OBJCFLAGS"
])
])
|