This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libobjc/50428] Consider changing semantics of +initialize so that it is inherited
- From: "nicola at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 08 Oct 2011 17:52:11 +0000
- Subject: [Bug libobjc/50428] Consider changing semantics of +initialize so that it is inherited
- Auto-submitted: auto-generated
- References: <bug-50428-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50428
--- Comment #2 from Nicola Pero <nicola at gcc dot gnu.org> 2011-10-08 17:52:11 UTC ---
Author: nicola
Date: Sat Oct 8 17:52:06 2011
New Revision: 179711
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179711
Log:
In libobjc/:
2011-10-08 Richard Frith-Macdonald <rfm@gnu.org>
Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/50428
* sendmsg.c (__objc_send_initialize): If a class does not have an
+initialize method, search for an +initialize method in the
superclass and in the ancestor classes and execute the first one
that is found. This makes the GNU runtime behave in the same way
as the Apple/NeXT runtime with respect to +initialize methods and
subclassing.
In gcc/:
2011-10-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/50428
* doc/objc.texi (Garbage Collection): Updated example to protect
+initialize against execution in subclasses.
In gcc/testsuite/:
2011-10-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/50428
* objc/execute/initialize-1.m: New test.
Added:
trunk/gcc/testsuite/objc/execute/initialize-1.m
Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/objc.texi
trunk/gcc/testsuite/ChangeLog
trunk/libobjc/ChangeLog
trunk/libobjc/sendmsg.c