Commit 3b62f224 by Mark Mitchell Committed by Mark Mitchell

* method.c (emit_thunk): Don't crash when -fsyntax-only.

From-SVN: r29748
parent e82d3ca3
1999-09-30 Mark Mitchell <mark@codesourcery.com>
* method.c (emit_thunk): Don't crash when -fsyntax-only.
* cp-tree.h (lang_decl_flags): Add global_ctor_p and
global_dtor_p. Add init_priority.
(DECL_ACCESS): Adjust accordingly.
......
......@@ -2086,8 +2086,9 @@ emit_thunk (thunk_fndecl)
TREE_SET_CODE (thunk_fndecl, FUNCTION_DECL);
{
#ifdef ASM_OUTPUT_MI_THUNK
if (!flag_syntax_only)
{
char *fnname;
current_function_decl = thunk_fndecl;
/* Make sure we build up its RTL before we go onto the
......@@ -2105,7 +2106,9 @@ emit_thunk (thunk_fndecl)
permanent_allocation (1);
current_function_decl = 0;
current_function = 0;
}
#else /* ASM_OUTPUT_MI_THUNK */
{
/* If we don't have the necessary macro for efficient thunks, generate a
thunk function that just makes a call to the real function.
Unfortunately, this doesn't work for varargs. */
......@@ -2157,8 +2160,8 @@ emit_thunk (thunk_fndecl)
output_inline_function (thunk_fndecl);
permanent_allocation (1);
}
#endif /* ASM_OUTPUT_MI_THUNK */
}
#endif /* ASM_OUTPUT_MI_THUNK */
TREE_SET_CODE (thunk_fndecl, THUNK_DECL);
}
......
// Build don't link:
// Special g++ Options: -fsyntax-only
// Origin: Mark Mitchell <mark@codesourcery.com>
struct B
{
double d;
virtual void f ();
};
struct C: virtual public B
{
char c;
};
struct D: virtual public B
{
int i;
virtual void f ();
};
struct E : public C, public D
{
};
E e;
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