Fix compiler crash in ObjC protocols
Nicola Pero
nicola@brainstorm.co.uk
Wed May 2 07:36:00 GMT 2001
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
More information about the Gcc-patches
mailing list