Commit 5a728aca by Mark Mitchell Committed by Mark Mitchell

decl.c (start_cleanup_fn): Mark the function as `inline'.

	* decl.c (start_cleanup_fn): Mark the function as `inline'.
	* decl2.c (get_guard): Call cp_finish_decl, not
	rest_of_decl_compilation, for local guards.
	* lex.c (do_identifier): Remove unused variable.

From-SVN: r35285
parent 1b68067d
2000-07-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_cleanup_fn): Mark the function as `inline'.
* decl2.c (get_guard): Call cp_finish_decl, not
rest_of_decl_compilation, for local guards.
* lex.c (do_identifier): Remove unused variable.
Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
* parse.y: Add missing ';'.
......
......@@ -8362,6 +8362,11 @@ start_cleanup_fn ()
compiler. */
TREE_PUBLIC (fndecl) = 0;
DECL_ARTIFICIAL (fndecl) = 1;
/* Make the function `inline' so that it is only emitted if it is
actually needed. It is unlikely that it will be inlined, since
it is only called via a function pointer, but we avoid unncessary
emissions this way. */
DECL_INLINE (fndecl) = 1;
/* Build the parameter. */
if (flag_use_cxa_atexit)
{
......
......@@ -2866,7 +2866,7 @@ get_guard (decl)
if (!flag_new_abi && !DECL_NAMESPACE_SCOPE_P (decl))
{
guard = get_temp_name (integer_type_node);
rest_of_decl_compilation (guard, NULL_PTR, 0, 0);
cp_finish_decl (guard, NULL_TREE, NULL_TREE, 0);
return guard;
}
......
......@@ -3071,7 +3071,6 @@ do_identifier (token, parsing, args)
{
register tree id;
int lexing = (parsing == 1);
int in_call = (parsing == 2);
if (! lexing || IDENTIFIER_OPNAME_P (token))
id = lookup_name (token, 0);
......
// Build don't run:
// Origin: scott snyder <snyder@fnal.gov>
struct Cleaner
{
~Cleaner() {}
};
template <class T>
void bar ()
{
static Cleaner cleanup;
}
inline
void foo() { bar<int>(); }
int main () {}
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