This is the mail archive of the
mailing list for the GCC project.
Re: Objective-C PATCH: Make synthetic decls and defns match
- From: Ziemowit Laski <zlaski at apple dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Stan Shebs <shebs at apple dot com>, Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Date: Fri, 27 Jun 2003 18:35:43 -0700
- Subject: Re: Objective-C PATCH: Make synthetic decls and defns match
On Friday, Jun 27, 2003, at 18:12 US/Pacific, Zack Weinberg wrote:
Ziemowit Laski <email@example.com> writes:
On Friday, Jun 27, 2003, at 17:51 US/Pacific, Zack Weinberg wrote:
My patch that detects 'static' mismatches between declarations and
definitions, found a whole bunch of places where the Objective C
end generates a synthetic declaration marked extern, then later a
synthetic definition of that symbol marked static. This patch
attempts to correct all of these places. I am not checking this in
because it's not obvious to me that I corrected them all the right
way, nor is it clear that I got them all. Could Objective C people
please give some feedback on this patch?
FWIW, I just checked, and we already have an equivalent mod in our
local Apple tree. :-)
(I ran into this while bringing up ObjC++.)
That's a useful data point at least. Is it precisely equivalent?
Well, instead if setting TREE_PUBLIC () to 0, we often just leave them
since presumably the whole structure was calloc'ed anyway. In some of
the cases, I also had to prevent TREE_READONLY () from being set to
the C++ gods (I forget the exact nature of their wrath, though).
That is, does it affect all the same things, no other things, and in
the same way for all of them?
I think you should also handle
struct objc_category _OBJC_CATEGORY_<name>;
in forward_declare_categories (). Other than that, I think you caught
all the places.
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477