This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fix compiler crash in ObjC protocols



Yuppiiie ! :-)

I am not sure this is the 100% right fix, but it works - gcc-3.1 can
compile Objective-C again !

Brilliant.

> The following patch fixes the compiler crashes that have been
> happening in Objective-C programs that use protocols (such as
> testsuite/objc/execute/formal-protocol-*.m).  I'm not 100% sure
> that this is the right fix, but the situation is that the ObjC
> frontend keeps around some open function decls for some crufty
> things it needs to do, and all the crashes come from synthesized
> decls that accidently pick up those function decls as context,
> even though they're really describing global data structures.
> So clearing DECL_CONTEXT causes them to be handled as global data,
> while leaving the tmp function decls alone.
> 
> Tested on powerpc-apple-darwin1.3, committed to trunk and
> 3.0 branch.
> 
> Stan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]