diff options
author | Matt Jacobson <mhjacobson@me.com> | 2021-07-29 09:57:23 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-08-17 20:10:39 +0100 |
commit | 798666392b512a585f0de2983a5d3423e960959e (patch) | |
tree | 680c87e13bfae9575fdc64c64b565f20fb76b15e /gcc/c-family/c-opts.c | |
parent | 60b94d8bd2280837e980a53cf81bdf902d726e61 (diff) | |
download | gcc-798666392b512a585f0de2983a5d3423e960959e.tar.gz |
Objective-C: Default flag_objc_sjlj_exceptions off for NeXT ABI >= 2.
Signed-off-by: Matt Jacobson <mhjacobson@me.com>
gcc/c-family/ChangeLog:
* c-opts.c (c_common_post_options): Default to
flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c
(objc_next_runtime_abi_02_init): Warn about and reset
flag_objc_sjlj_exceptions regardless of flag_objc_exceptions.
(next_runtime_02_initialize): Use a checking assert that
flag_objc_sjlj_exceptions is off.
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r-- | gcc/c-family/c-opts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 1c4e832c7ed..373af0cf06f 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -852,9 +852,9 @@ c_common_post_options (const char **pfilename) else if (!flag_gnu89_inline && !flag_isoc99) error ("%<-fno-gnu89-inline%> is only supported in GNU99 or C99 mode"); - /* Default to ObjC sjlj exception handling if NeXT runtime. */ + /* Default to ObjC sjlj exception handling if NeXT runtime < v2. */ if (flag_objc_sjlj_exceptions < 0) - flag_objc_sjlj_exceptions = flag_next_runtime; + flag_objc_sjlj_exceptions = (flag_next_runtime && flag_objc_abi < 2); if (flag_objc_exceptions && !flag_objc_sjlj_exceptions) flag_exceptions = 1; |