+2001-02-22 Andreas Jaeger <aj@suse.de>
+
+ * optimize.c: Include toplev.h for
+ note_deferral_of_defined_inline_function prototype.
+
2001-02-22 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (struct lang_decl_inlined_fns): New.
appropriate.
(start_function): Set current_vtt_parm.
(lang_mark_tree): Don't mark vtt_parm.
- * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
+ * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
* class.c (build_clone): Maybe remove the VTT parm.
* optimize.c (maybe_clone_body): Set up the VTT parm.
* decl2.c (build_artificial_parm): Set TREE_READONLY.
- * decl.c (bad_specifiers): Allow throw specs on things with
+ * decl.c (bad_specifiers): Allow throw specs on things with
pointer-to-function or -member-function type.
* init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
a pmf.
non-virtual destructor.
* init.c (build_delete): Explicitly call `operator delete' when
deleting an object with a non-virtual destructor.
-
+
2001-02-13 Jason Merrill <jason@redhat.com>
* lang-specs.h: Add more __EXCEPTIONS.
* decl2.c (flag_vtable_thunks): Always set it to 1.
(flag_new_abi): Likewise.
* lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
-
+
* Makefile.in (g++spec.o): Fix typo.
2001-02-09 Jason Merrill <jason@redhat.com>
* typeck2.c (friendly_abort): Don't say anything if we have
earlier errors or sorries.
- * decl.c (check_tag_decl): Notice attempts to redefine bool and
+ * decl.c (check_tag_decl): Notice attempts to redefine bool and
wchar_t. Ignore if in_system_header.
* decl.c (maybe_push_cleanup_level): New fn...
2001-02-07 Mark Mitchell <mark@codesourcery.com>
- * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
+ * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
spec.
2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
(typeinfo_in_lib_p): New function.
(synthesize_tinfo_var): Use it.
(create_real_tinfo_var): Likewise.
-
+
2001-02-03 Jakub Jelinek <jakub@redhat.com>
* decl.c (push_class_binding): Use context_for_name_lookup instead
* cvt.c (ocp_convert): Handle vector type conversion
* typeck2.c (digest_init): Handle vector type initializations
-
+
2001-01-16 Phil Edwards <pme@sources.redhat.com>
* g++spec.c: Don't add libraries needlessly if -fsyntax-only
DECL_INITIALIZED_IN_CLASS_P.
(instantiate_class_template): Likewise.
(instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
-
+
* class.c (finish_struct): Constify saved_filename.
2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
Don't set TREE_VALUE on the class_shadowed list.
2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
-
- * decl2.c (acceptable_java_type): Allow references too.
+
+ * decl2.c (acceptable_java_type): Allow references too.
* init.c (build_java_class_ref): When using the new ABI, search
`class$' and have it mangled with `mangle_decl.'
* mangle.c (write_java_integer_type_codes): New function.
(write_builtin_type): Detect and mangle Java integer and real
types.
-
+
2001-01-07 Mark Mitchell <mark@codesourcery.com>
* decl2.c (grokfield): Don't accept `asm' specifiers for
(implicitly_declare_fn): Generate the exception spec too.
* search.c (check_final_overrider): Check artificial functions
too.
- * typeck2.c (merge_exception_specifiers): New function.
+ * typeck2.c (merge_exception_specifiers): New function.
2001-01-03 Jason Merrill <jason@redhat.com>
(tsubst_template_parms): Use size_int, not build_int_2.
(tsubst): Likewise.
* rtti.c (get_vmi_pseudo_type_info): Likewise.
-
+
2001-01-02 Richard Henderson <rth@redhat.com>
* parse.y (asm): Set ASM_INPUT_P.
* typeck.c (build_unary_op): Restore old &a.f diagnostic code.
* cvt.c (convert_to_void): Use type_unknown_p.
- * typeck.c (strip_all_pointer_quals): Also strip quals from
+ * typeck.c (strip_all_pointer_quals): Also strip quals from
pointer-to-member types.
* Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "insn-config.h"
#include "input.h"
#include "integrate.h"
+#include "toplev.h"
#include "varray.h"
#include "ggc.h"
function-local static constants just like global static
constants; the back-end already knows not to output them if they
are not needed.
-
+
o Provide heuristics to clamp inlining of recursive template
calls? */
if (!n)
{
tree t;
-
+
/* Make a copy of the variable or label. */
- t = copy_decl_for_inlining (decl, fn,
+ t = copy_decl_for_inlining (decl, fn,
VARRAY_TREE (id->fns, 0));
/* The decl T could be a dynamic array or other variable size type,
&& TYPE_DOMAIN (TREE_TYPE (t)))
{
TREE_TYPE (t) = copy_node (TREE_TYPE (t));
- TYPE_DOMAIN (TREE_TYPE (t))
+ TYPE_DOMAIN (TREE_TYPE (t))
= copy_node (TYPE_DOMAIN (TREE_TYPE (t)));
walk_tree (&TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))),
copy_body_r, id, NULL);
/* Remember it, so that if we encounter this local entity
again we can reuse this copy. */
- n = splay_tree_insert (id->decl_map,
- (splay_tree_key) decl,
+ n = splay_tree_insert (id->decl_map,
+ (splay_tree_key) decl,
(splay_tree_value) t);
}
-
+
return (tree) n->value;
}
SCOPE_STMT_BLOCK (scope_stmt) = new_block;
/* Remap its variables. */
- for (old_var = decls ? decls : BLOCK_VARS (old_block);
- old_var;
+ for (old_var = decls ? decls : BLOCK_VARS (old_block);
+ old_var;
old_var = TREE_CHAIN (old_var))
{
tree new_var;
splay_tree_node n;
/* Find this block in the table of remapped things. */
- n = splay_tree_lookup (id->decl_map,
+ n = splay_tree_lookup (id->decl_map,
(splay_tree_key) SCOPE_STMT_BLOCK (scope_stmt));
my_friendly_assert (n != NULL, 19991203);
SCOPE_STMT_BLOCK (scope_stmt) = (tree) n->value;
TREE_CHAIN (goto_stmt) = TREE_CHAIN (return_stmt);
/* If we're returning something, just turn that into an
- assignment into the equivalent of the original
+ assignment into the equivalent of the original
RESULT_DECL. */
if (RETURN_EXPR (return_stmt))
{
- *tp = build_stmt (EXPR_STMT,
+ *tp = build_stmt (EXPR_STMT,
RETURN_EXPR (return_stmt));
STMT_IS_FULL_EXPR_P (*tp) = 1;
/* And then jump to the end of the function. */
STRIP_TYPE_NOPS (new_decl);
*tp = new_decl;
}
- else if (nonstatic_local_decl_p (*tp)
+ else if (nonstatic_local_decl_p (*tp)
&& DECL_CONTEXT (*tp) != VARRAY_TREE (id->fns, 0))
my_friendly_abort (0);
else if (TREE_CODE (*tp) == SAVE_EXPR)
- remap_save_expr (tp, id->decl_map, VARRAY_TREE (id->fns, 0),
+ remap_save_expr (tp, id->decl_map, VARRAY_TREE (id->fns, 0),
walk_subtrees);
else if (TREE_CODE (*tp) == UNSAVE_EXPR)
/* UNSAVE_EXPRs should not be generated until expansion time. */
tree init_stmt;
tree var;
tree value;
-
+
/* Find the initializer. */
value = TREE_VALUE (a);
/* If the parameter is never assigned to, we may not need to
create a new variable here at all. Instead, we may be able
to just use the argument value. */
- if (TREE_READONLY (p)
+ if (TREE_READONLY (p)
&& !TREE_ADDRESSABLE (p)
&& !TREE_SIDE_EFFECTS (value))
{
/* Simplify the value, if possible. */
value = fold (decl_constant_value (value));
-
+
/* We can't risk substituting complex expressions. They
might contain variables that will be assigned to later.
Theoretically, we could check the expression to see if
continue;
}
}
-
+
/* Make an equivalent VAR_DECL. */
var = copy_decl_for_inlining (p, fn, VARRAY_TREE (id->fns, 0));
/* Register the VAR_DECL as the equivalent for the PARM_DECL;
that way, when the PARM_DECL is encountered, it will be
automatically replaced by the VAR_DECL. */
- splay_tree_insert (id->decl_map,
+ splay_tree_insert (id->decl_map,
(splay_tree_key) p,
(splay_tree_value) var);
my_friendly_assert (VARRAY_ACTIVE_SIZE (id->target_exprs) != 0,
20000430);
var = TREE_OPERAND (VARRAY_TOP_TREE (id->target_exprs), 0);
- my_friendly_assert
- (same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (var),
+ my_friendly_assert
+ (same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (var),
TREE_TYPE (result)),
20000430);
}
/* Register the VAR_DECL as the equivalent for the RESULT_DECL; that
way, when the RESULT_DECL is encountered, it will be
automatically replaced by the VAR_DECL. */
- splay_tree_insert (id->decl_map,
+ splay_tree_insert (id->decl_map,
(splay_tree_key) result,
(splay_tree_value) var);
/* We can inline a template instantiation only if it's fully
instantiated. */
- if (inlinable
- && DECL_TEMPLATE_INFO (fn)
+ if (inlinable
+ && DECL_TEMPLATE_INFO (fn)
&& TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn)))
{
fn = instantiate_decl (fn, /*defer_ok=*/0);
/* See what we've got. */
id = (inline_data *) data;
- t = *tp;
+ t = *tp;
/* Recurse, but letting recursive invocations know that we are
inside the body of a TARGET_EXPR. */
/* Declare the return variable for the function. */
STMT_EXPR_STMT (expr)
- = chainon (STMT_EXPR_STMT (expr),
+ = chainon (STMT_EXPR_STMT (expr),
declare_return_variable (id, &use_stmt));
-
+
/* After we've initialized the parameters, we insert the body of the
function itself. */
inlined_body = &STMT_EXPR_STMT (expr);
/* Close the block for the parameters. */
scope_stmt = build_stmt (SCOPE_STMT, DECL_INITIAL (fn));
SCOPE_NO_CLEANUPS_P (scope_stmt) = 1;
- my_friendly_assert (DECL_INITIAL (fn)
+ my_friendly_assert (DECL_INITIAL (fn)
&& TREE_CODE (DECL_INITIAL (fn)) == BLOCK,
19991203);
remap_block (scope_stmt, NULL_TREE, id);
before we evaluate the returned value below, because that evalulation
may cause RTL to be generated. */
STMT_EXPR_STMT (expr)
- = chainon (STMT_EXPR_STMT (expr),
+ = chainon (STMT_EXPR_STMT (expr),
build_stmt (LABEL_STMT, id->ret_label));
/* Finally, mention the returned value so that the value of the
calls_setjmp_p (fn)
tree fn;
{
- return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn),
- calls_setjmp_r,
+ return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn),
+ calls_setjmp_r,
NULL) != NULL_TREE;
}
expand_body (clone);
pop_from_top_level ();
}
-
+
/* We don't need to process the original function any further. */
return 1;
}