Re: Distributed Objects - setting protocol crashing GCC 4.0
Re: Distributed Objects - setting protocol crashing GCC 4.0
- Subject: Re: Distributed Objects - setting protocol crashing GCC 4.0
- From: "Johannes Fortmann" <email@hidden>
- Date: Tue, 11 Apr 2006 11:29:33 +0100
I filed the following bug report last year, which details at least one
possible reason for this behaviour: selector types are encoded
differently between gcc 3 and 4, and between objc++ and objc. This bug
report ( rdar://4301047 ) was closed without any comment.
I've since deleted the test project mentioned in the report, but it's
extremely easy to reproduce: simply build a class with a non-trivial
selector, then print the selectors signature; compile with both gcc
3.3 and 4.0.1, and compare.
My original bug report:
14-Oct-2005 02:04 PM Johannes Fortmann:
Summary:
The method signatures of identically declared selectors can differ
from each other in certain cases.
Steps to Reproduce:
Build and run the attached sample project with gcc 4.0 (already set as
default in project).
The sample project contains two classes, ObjCClass and CPPClass. These
classes differ only in that the implementation for CPPClass is in a
Objective-C++ file, while the implementation for ObjCClass is in a
pure Objective-C file. Both implement a simple protocol,
CommonProtocol, with a selector, declared -(oneway void)methodCall:(in
bycopy id)someValue.
The program instantiates both objects, and prints their method
signatures of the selector.
Expected Results:
The methods are declared and defined identically and should therefore
have identical method signatures.
Actual Results:
The method signatures differ in the order of the type qualifiers.
Specifically, the types of CPPClass' selector are "Vv@:On@", those of
ObjCClass are "Vv@:nO@". Note how the first says "On", the second
"nO".
Regression:
When compiling with gcc 3.3, both types evaluate the same, "Vv@:On@".
Notes:
This bug means that it e.g. becomes impossible to use DO with
setProtocolForProxy:, when either code compiled with gcc 3 or as
ObjC++ comes into play.
'RuntimeTest.zip' and 'mini.spx'were successfully uploaded
13-Nov-2005 03:52 PM Johannes Fortmann:
With gcc 4.0.1, both the ObjC++ class and the ObjC class encode their
types as "Vv@:nO@". That means that code compiled with gcc 4.0.1 is
now binary incompatible with code compiled with gcc 3.3.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden