This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

objective-c++ patch to fix meta-data generation due to iterative template instantiation


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.

Attachment: fsf-obj-cplus-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]