aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-10-17 11:01:31 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-10-17 11:01:31 +0000
commit1501d0941a5d845d923b30c6199ce0f8b792bdc8 (patch)
tree013659d5354d68e2fe8c2c1e6e3d02449f4adf4b /gcc
parent368be4c7351ae32340d6ef1fbf330467792c1432 (diff)
downloadgcc-1501d0941a5d845d923b30c6199ce0f8b792bdc8.zip
gcc-1501d0941a5d845d923b30c6199ce0f8b792bdc8.tar.gz
gcc-1501d0941a5d845d923b30c6199ce0f8b792bdc8.tar.bz2
In libobjc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> * init.c (objc_send_load): Do not wait for NXConstantString to be registered before executing +load. There is no point if -fconstant-string-class=xxx is used when compiling all modules, as is the case for almost all users. * linking.m (__objc_linking): Do not try to forcefully link in NXConstantString. In gcc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> * doc/objc.texi (What you can and what you cannot do in +load): Document that sending messages to constant string objects in +load is not guaranteed to work. From-SVN: r165583
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/objc.texi21
2 files changed, 20 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e65867d..47254d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * doc/objc.texi (What you can and what you cannot do in +load):
+ Document that sending messages to constant string objects in +load
+ is not guaranteed to work.
+
2010-10-16 Jan Hubicka <jh@suse.cz>
PR middle-end/44206
diff --git a/gcc/doc/objc.texi b/gcc/doc/objc.texi
index 87c985d..f0fab6b 100644
--- a/gcc/doc/objc.texi
+++ b/gcc/doc/objc.texi
@@ -107,8 +107,14 @@ instead of @code{+initialize}.
@node What you can and what you cannot do in +load
@subsection What you can and what you cannot do in @code{+load}
-The @code{+load} implementation in the GNU runtime guarantees you the following
-things:
+@code{+load} is to be used only as a last resort. Because it is
+executed very early, most of the Objective-C runtime machinery will
+not be ready when @code{+load} is executed; hence @code{+load} works
+best for executing C code that is independent on the Objective-C
+runtime.
+
+The @code{+load} implementation in the GNU runtime guarantees you the
+following things:
@itemize @bullet
@@ -116,15 +122,12 @@ things:
you can write whatever C code you like;
@item
-you can send messages to Objective-C constant strings (@code{@@"this is a
-constant string"});
-
-@item
you can allocate and send messages to objects whose class is implemented
in the same file;
@item
-the @code{+load} implementation of all super classes of a class are executed before the @code{+load} of that class is executed;
+the @code{+load} implementation of all super classes of a class are
+executed before the @code{+load} of that class is executed;
@item
the @code{+load} implementation of a class is executed before the
@@ -144,6 +147,10 @@ allocation of or sending messages to arbitrary objects;
allocation of or sending messages to objects whose classes have a
category implemented in the same file;
+@item
+sending messages to Objective-C constant strings (@code{@@"this is a
+constant string"});
+
@end itemize
You should make no assumptions about receiving @code{+load} in sibling