This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ObjC] PATCH: set at_eof before instantiating templates
- From: Stan Shebs <shebs at apple dot com>
- To: Matt Austern <austern at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Jan 2005 21:17:30 -0800
- Subject: Re: [ObjC] PATCH: set at_eof before instantiating templates
- References: <B9A768AD-70A9-11D9-9501-000A95AA5E5E@apple.com>
Matt Austern wrote:
This only affects Objective-C++, but there's no sense in having
something wrong in the tree even if ObjC++ integration is still
incomplete.
objc_finish_file does the first round of C++ template instantiation
before invoking cp_finish_file. Doing end-of-file template
instantiation without setting at_eof is incorrect; among other things,
it results in extern templates getting emitted. (There's no need to
clear at_eof after calling instantiate_pending_templates, because
nothing that follows this relies on at_eof being 0. And, after all,
it's just plain true that at this point we're at eof!)
OK to commit to mainline?
(Standing in for the overworked Zem :-) )
Yes, this is OK.
Stan