public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-11341] Objective-C: Default flag_objc_sjlj_exceptions off for NeXT ABI >= 2. Date: Tue, 23 Apr 2024 14:11:45 +0000 (GMT) [thread overview] Message-ID: <20240423141145.66B63385840D@sourceware.org> (raw) https://gcc.gnu.org/g:895bb1b2eb82e76d3bfc48bf35a0bbafae82d873 commit r11-11341-g895bb1b2eb82e76d3bfc48bf35a0bbafae82d873 Author: Matt Jacobson <mhjacobson@me.com> Date: Thu Jul 29 09:57:23 2021 +0100 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. (cherry picked from commit 798666392b512a585f0de2983a5d3423e960959e) Diff: --- gcc/c-family/c-opts.c | 4 ++-- gcc/objc/objc-next-runtime-abi-02.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 6f001e0bb6c..5bfa239ec0b 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; diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c index 2f18b04e34a..2a4f87cc726 100644 --- a/gcc/objc/objc-next-runtime-abi-02.c +++ b/gcc/objc/objc-next-runtime-abi-02.c @@ -245,7 +245,7 @@ objc_next_runtime_abi_02_init (objc_runtime_hooks *rthooks) { extern_names = ggc_cleared_vec_alloc<hash> (SIZEHASHTABLE); - if (flag_objc_exceptions && flag_objc_sjlj_exceptions) + if (flag_objc_sjlj_exceptions) { inform (UNKNOWN_LOCATION, "%<-fobjc-sjlj-exceptions%> is ignored for " @@ -511,7 +511,7 @@ static void next_runtime_02_initialize (void) objc_getPropertyStruct_decl = NULL_TREE; objc_setPropertyStruct_decl = NULL_TREE; - gcc_assert (!flag_objc_sjlj_exceptions); + gcc_checking_assert (!flag_objc_sjlj_exceptions); /* Although we warn that fobjc-exceptions is required for exceptions code, we carry on and create it anyway. */
reply other threads:[~2024-04-23 14:11 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240423141145.66B63385840D@sourceware.org \ --to=iains@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).