This is the mail archive of the
mailing list for the GCC project.
Re: Fix compiler crash in ObjC protocols
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: Fix compiler crash in ObjC protocols
- From: Nicola Pero <nicola at brainstorm dot co dot uk>
- Date: Wed, 2 May 2001 15:34:20 +0100 (BST)
- Cc: gcc-patches at gcc dot gnu dot org
Yuppiiie ! :-)
I am not sure this is the 100% right fix, but it works - gcc-3.1 can
compile Objective-C again !
> 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.