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-11340] Objective-C, NeXT runtime: Correct the default for fobjc-nilcheck.
Date: Tue, 23 Apr 2024 14:11:27 +0000 (GMT)	[thread overview]
Message-ID: <20240423141127.770613858C50@sourceware.org> (raw)

https://gcc.gnu.org/g:b907af1ce4966b662ae3d26afa24fa6c3ac468c9

commit r11-11340-gb907af1ce4966b662ae3d26afa24fa6c3ac468c9
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sun Aug 15 12:52:30 2021 +0100

    Objective-C, NeXT runtime: Correct the default for fobjc-nilcheck.
    
    It is intended that the default for the NeXT runtime at ABI 2 is to
    check for nil message receivers.  This updates this to match the
    documented behaviour and to match the behaviour of the system tools.
    
    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
    
    gcc/objc/ChangeLog:
    
            * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init):
            Default receiver nilchecks on.
    
    (cherry picked from commit de0b250b2badb475f8c09f3cd2c57fd3f9127fe3)

Diff:
---
 gcc/objc/objc-next-runtime-abi-02.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index e99c048e3a1..2f18b04e34a 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -254,6 +254,10 @@ objc_next_runtime_abi_02_init (objc_runtime_hooks *rthooks)
       flag_objc_sjlj_exceptions = 0;
     }
 
+  /* NeXT ABI 2 is intended to default to checking for nil receivers.  */
+  if (! global_options_set.x_flag_objc_nilcheck)
+    flag_objc_nilcheck = 1;
+
   rthooks->initialize = next_runtime_02_initialize;
   rthooks->default_constant_string_class_name = DEF_CONSTANT_STRING_CLASS_NAME;
   rthooks->tag_getclass = TAG_GETCLASS;

                 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=20240423141127.770613858C50@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: link
Be 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).