objective-c++ patch to fix meta-data generation due to iterative template instantiation
Fariborz Jahanian
fjahanian@apple.com
Wed Oct 4 18:32:00 GMT 2006
This patch addresses an objective-c++ problem in which not all
objective-c++'s meta-data is generated due to pending instantiations.
This results in assembler putting out errors on used but undefined
symbols in the attached test case. Current objective-c++
implementation does one iteration
of instantiation. This patch calls a new routine (which is code
pulled out of cp_finish_file) to iterate through all instantiations
before generating the meta-data. The cp/decl2.c change is merely
pulling out the iterative instantiation code from cp_finish_file and
turning it into a function which both cp_finish_file and
objc_finish_file call.
This patch is dejagnu tested on apple-ppc-darwin.
OK for check-in inito the current 4.3 trunk?
- Fariborz (fjahanian@apple.com)
cp/ChangeLog:
2006-10-04 Fariborz Jahanian <fjahanian@apple.com>
* decl2.c (emit_instantiate_pending_templates): New function.
(cp_finish_file): Call to emit_instantiate_pending_templates
replaces inlined code.
* decl.h (emit_instantiate_pending_templates): Declare.
2006-10-04 Fariborz Jahanian <fjahanian@apple.com>
* objc-act.c (objc_finish_file): Replace
instantiate_pending_templates
with emit_instantiate_pending_templates.
* objc-act.h (emit_instantiate_pending_templates): Declare.
testsuite/ChangeLog:
2006-10-04 Fariborz Jahanian <fjahanian@apple.com>
* obj-c++.dg/template-7.mm: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-obj-cplus-patch.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061004/5741e844/attachment.txt>
More information about the Gcc-patches
mailing list