public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3030] Objective-C, NeXT runtime: Correct the default for fobjc-nilcheck.
@ 2021-08-19 18:39 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2021-08-19 18:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:de0b250b2badb475f8c09f3cd2c57fd3f9127fe3
commit r12-3030-gde0b250b2badb475f8c09f3cd2c57fd3f9127fe3
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.
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 0d963e357c4..ce831fc34ae 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-19 18:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 18:39 [gcc r12-3030] Objective-C, NeXT runtime: Correct the default for fobjc-nilcheck Iain D Sandoe
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).