Commit 9c73ec84 by Mike Stump Committed by Mike Stump

decl2.c (import_export_decl): Because vtables always reference virtual functions...

	* decl2.c (import_export_decl): Because vtables always reference
	virtual functions, even if they are inlined, don't allow
	-fno-implement-inlines to not emit them, instead, emit them with
	the vtable.
	* decl.c (start_function): Likewise.
Fixes vtable1.C

From-SVN: r26416
parent 63a4a903
1999-04-13 Mike Stump <mrs@wrs.com>
* decl2.c (import_export_decl): Because vtables always reference
virtual functions, even if they are inlined, don't allow
-fno-implement-inlines to not emit them, instead, emit them with
the vtable.
* decl.c (start_function): Likewise.
1999-04-12 Jason Merrill <jason@yorick.cygnus.com> 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (struct lang_type): Add com_interface. * cp-tree.h (struct lang_type): Add com_interface.
......
...@@ -13260,7 +13260,8 @@ start_function (declspecs, declarator, attrs, pre_parsed_p) ...@@ -13260,7 +13260,8 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
{ {
DECL_EXTERNAL (decl1) DECL_EXTERNAL (decl1)
= (interface_only = (interface_only
|| (DECL_THIS_INLINE (decl1) && ! flag_implement_inlines)); || (DECL_THIS_INLINE (decl1) && ! flag_implement_inlines
&& !DECL_VINDEX (decl1)));
/* For WIN32 we also want to put these in linkonce sections. */ /* For WIN32 we also want to put these in linkonce sections. */
maybe_make_one_only (decl1); maybe_make_one_only (decl1);
......
...@@ -2773,7 +2773,8 @@ import_export_decl (decl) ...@@ -2773,7 +2773,8 @@ import_export_decl (decl)
{ {
DECL_NOT_REALLY_EXTERN (decl) DECL_NOT_REALLY_EXTERN (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype) = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
|| (DECL_THIS_INLINE (decl) && ! flag_implement_inlines)); || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines
&& !DECL_VINDEX (decl)));
/* Always make artificials weak. */ /* Always make artificials weak. */
if (DECL_ARTIFICIAL (decl) && flag_weak) if (DECL_ARTIFICIAL (decl) && flag_weak)
...@@ -2803,7 +2804,8 @@ import_export_decl (decl) ...@@ -2803,7 +2804,8 @@ import_export_decl (decl)
{ {
DECL_NOT_REALLY_EXTERN (decl) DECL_NOT_REALLY_EXTERN (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype) = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
|| (DECL_THIS_INLINE (decl) && ! flag_implement_inlines)); || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines
&& !DECL_VINDEX (decl)));
/* Always make artificials weak. */ /* Always make artificials weak. */
if (flag_weak) if (flag_weak)
......
// Build don't run:
// Special g++ Options: -fno-implement-inlines
struct type {
virtual void m1();
virtual void m2() { }
};
void type::m1() { }
int main() {
type t;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment