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]

[PATCH] Fix #pragma interface C++ breakage


Hi!

This patch fixes aspell compilation where the main file does not use
#pragma interface, yet g++ for some classes defined in that file
does not emit virtual tables because it creates them with stale
interface_only information.
I have not yet distilled the test case into suitably short piece of code
(the partly distilled source is at
ftp://sunsite.mff.cuni.cz/private/gcc/interface_only.patch), am just
wondering whether this is the right thing to do or whether the
extract_interface_info call should be put somewhere else.
What happens there is basically that during expand_inline_function
indirectly pop_tinst_level calls extract_interface_info with a header file
which has the templates to expand, but nobody updates extract_interface_info
since then.

2000-06-23  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (expand_body): Sync interface information
	at the end of function body expansion.

--- gcc/cp/semantics.c.jj	Fri Jun 23 11:52:15 2000
+++ gcc/cp/semantics.c	Fri Jun 23 18:38:20 2000
@@ -3143,6 +3143,7 @@ expand_body (fn)
   /* And restore the current source position.  */
   lineno = saved_lineno;
   input_filename = saved_input_filename;
+  extract_interface_info ();
 
   timevar_pop (TV_EXPAND);
 }

	Jakub

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