Commit 3db45ab5 by Mike Stump

Fix up whitespacing

From-SVN: r114428
parent c713f9e4
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
(cp_parser_pure_specifier): Likewise. (cp_parser_pure_specifier): Likewise.
PR c++/26068 PR c++/26068
* parser.c (cp_parser_set_storage_class): Check for * parser.c (cp_parser_set_storage_class): Check for
invalid uses of storage classes on unbraced linkage invalid uses of storage classes on unbraced linkage
specifications. specifications.
(cp_parser_decl_specifier_seq): Pass keywords, not storage classes, (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
(cp_parser_explicit_specialization): Adjust call to (cp_parser_explicit_specialization): Adjust call to
cp_parser_single_declaration. cp_parser_single_declaration.
(cp_parser_init_declarator): Perform template-parameter access (cp_parser_init_declarator): Perform template-parameter access
checks. checks.
(cp_parser_parameter_declaration): Do not defer checks for (cp_parser_parameter_declaration): Do not defer checks for
template parameter default arguments. template parameter default arguments.
(cp_parser_template_declaration_after_export): Gather access (cp_parser_template_declaration_after_export): Gather access
...@@ -398,11 +398,11 @@ ...@@ -398,11 +398,11 @@
type. type.
(build_modify_expr): Remove spurious conversions. (build_modify_expr): Remove spurious conversions.
* class.c (layout_class_type): Modify the type of bitfields to * class.c (layout_class_type): Modify the type of bitfields to
indicate a limited range. indicate a limited range.
* call.c (standard_conversion): Adjust the type of bitfield * call.c (standard_conversion): Adjust the type of bitfield
expressions used in an rvalue context. expressions used in an rvalue context.
(build_conditional_expr): Likewise. (build_conditional_expr): Likewise.
2006-04-22 Kazu Hirata <kazu@codesourcery.com> 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
* decl.c: Fix comment typos. * decl.c: Fix comment typos.
......
...@@ -2835,7 +2835,7 @@ build_new_function_call (tree fn, tree args, bool koenig_p) ...@@ -2835,7 +2835,7 @@ build_new_function_call (tree fn, tree args, bool koenig_p)
set, upon return, to the allocation function called. */ set, upon return, to the allocation function called. */
tree tree
build_operator_new_call (tree fnname, tree args, build_operator_new_call (tree fnname, tree args,
tree *size, tree *cookie_size, tree *size, tree *cookie_size,
tree *fn) tree *fn)
{ {
...@@ -3302,7 +3302,7 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) ...@@ -3302,7 +3302,7 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3)
|| (conv3 && conv3->kind == ck_ambig)) || (conv3 && conv3->kind == ck_ambig))
{ {
error ("operands to ?: have different types %qT and %qT", error ("operands to ?: have different types %qT and %qT",
arg2_type, arg3_type); arg2_type, arg3_type);
result = error_mark_node; result = error_mark_node;
} }
else if (conv2 && (!conv2->bad_p || !conv3)) else if (conv2 && (!conv2->bad_p || !conv3))
...@@ -3512,8 +3512,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) ...@@ -3512,8 +3512,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3)
if (!result_type) if (!result_type)
{ {
error ("operands to ?: have different types %qT and %qT", error ("operands to ?: have different types %qT and %qT",
arg2_type, arg3_type); arg2_type, arg3_type);
return error_mark_node; return error_mark_node;
} }
...@@ -6068,7 +6068,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn) ...@@ -6068,7 +6068,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn)
if (warn) if (warn)
{ {
warning (OPT_Wsign_promo, "passing %qT chooses %qT over %qT", warning (OPT_Wsign_promo, "passing %qT chooses %qT over %qT",
type, type1, type2); type, type1, type2);
warning (OPT_Wsign_promo, " in call to %qD", w->fn); warning (OPT_Wsign_promo, " in call to %qD", w->fn);
} }
else else
......
...@@ -57,13 +57,13 @@ hash (register const char *str, register unsigned int len) ...@@ -57,13 +57,13 @@ hash (register const char *str, register unsigned int len)
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 0, 0, 400, 400, 400, 400, 400, 400, 400, 400, 0, 0,
1, 400, 400, 400, 400, 400, 400, 400, 400, 400, 1, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 28, 90, 0, 400, 400, 400, 400, 400, 400, 400, 28, 90, 0,
95, 0, 51, 93, 114, 26, 109, 124, 5, 1, 95, 0, 51, 93, 114, 26, 109, 124, 5, 1,
6, 13, 37, 128, 3, 0, 0, 49, 38, 0, 6, 13, 37, 128, 3, 0, 0, 49, 38, 0,
104, 45, 0, 400, 400, 400, 400, 400, 400, 400, 104, 45, 0, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
...@@ -84,23 +84,23 @@ hash (register const char *str, register unsigned int len) ...@@ -84,23 +84,23 @@ hash (register const char *str, register unsigned int len)
switch (hval) switch (hval)
{ {
default: default:
hval += asso_values[(unsigned char)str[5]+1]; hval += asso_values[(unsigned char)str[5]+1];
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case 5: case 5:
hval += asso_values[(unsigned char)str[4]]; hval += asso_values[(unsigned char)str[4]];
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case 4: case 4:
hval += asso_values[(unsigned char)str[3]]; hval += asso_values[(unsigned char)str[3]];
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case 3: case 3:
hval += asso_values[(unsigned char)str[2]]; hval += asso_values[(unsigned char)str[2]];
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case 2: case 2:
hval += asso_values[(unsigned char)str[1]]; hval += asso_values[(unsigned char)str[1]];
/*FALLTHROUGH*/ /*FALLTHROUGH*/
case 1: case 1:
hval += asso_values[(unsigned char)str[0]]; hval += asso_values[(unsigned char)str[0]];
break; break;
} }
return hval + asso_values[(unsigned char)str[len - 1]]; return hval + asso_values[(unsigned char)str[len - 1]];
} }
...@@ -329,17 +329,17 @@ libc_name_p (register const char *str, register unsigned int len) ...@@ -329,17 +329,17 @@ libc_name_p (register const char *str, register unsigned int len)
register int key = hash (str, len); register int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0) if (key <= MAX_HASH_VALUE && key >= 0)
{ {
register int index = lookup[key]; register int index = lookup[key];
if (index >= 0) if (index >= 0)
{ {
register const char *s = wordlist[index]; register const char *s = wordlist[index];
if (*str == *s && !strcmp (str + 1, s + 1)) if (*str == *s && !strcmp (str + 1, s + 1))
return s; return s;
} }
} }
} }
return 0; return 0;
} }
...@@ -1066,7 +1066,7 @@ add_method (tree type, tree method, tree using_decl) ...@@ -1066,7 +1066,7 @@ add_method (tree type, tree method, tree using_decl)
} }
} }
/* A class should never have more than one destructor. */ /* A class should never have more than one destructor. */
if (current_fns && DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method)) if (current_fns && DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method))
return false; return false;
...@@ -1232,7 +1232,7 @@ check_bases (tree t, ...@@ -1232,7 +1232,7 @@ check_bases (tree t,
dtor is handled in finish_struct_1. */ dtor is handled in finish_struct_1. */
if (!TYPE_POLYMORPHIC_P (basetype)) if (!TYPE_POLYMORPHIC_P (basetype))
warning (OPT_Weffc__, warning (OPT_Weffc__,
"base class %q#T has a non-virtual destructor", basetype); "base class %q#T has a non-virtual destructor", basetype);
/* If the base class doesn't have copy constructors or /* If the base class doesn't have copy constructors or
assignment operators that take const references, then the assignment operators that take const references, then the
...@@ -1547,7 +1547,7 @@ maybe_warn_about_overly_private_class (tree t) ...@@ -1547,7 +1547,7 @@ maybe_warn_about_overly_private_class (tree t)
if (!has_nonprivate_method) if (!has_nonprivate_method)
{ {
warning (OPT_Wctor_dtor_privacy, warning (OPT_Wctor_dtor_privacy,
"all member functions in class %qT are private", t); "all member functions in class %qT are private", t);
return; return;
} }
} }
...@@ -1559,7 +1559,7 @@ maybe_warn_about_overly_private_class (tree t) ...@@ -1559,7 +1559,7 @@ maybe_warn_about_overly_private_class (tree t)
if (fn && TREE_PRIVATE (fn)) if (fn && TREE_PRIVATE (fn))
{ {
warning (OPT_Wctor_dtor_privacy, warning (OPT_Wctor_dtor_privacy,
"%q#T only defines a private destructor and has no friends", "%q#T only defines a private destructor and has no friends",
t); t);
return; return;
} }
...@@ -1603,7 +1603,7 @@ maybe_warn_about_overly_private_class (tree t) ...@@ -1603,7 +1603,7 @@ maybe_warn_about_overly_private_class (tree t)
if (nonprivate_ctor == 0) if (nonprivate_ctor == 0)
{ {
warning (OPT_Wctor_dtor_privacy, warning (OPT_Wctor_dtor_privacy,
"%q#T only defines private constructors and has no friends", "%q#T only defines private constructors and has no friends",
t); t);
return; return;
} }
...@@ -2630,7 +2630,7 @@ check_bitfield_decl (tree field) ...@@ -2630,7 +2630,7 @@ check_bitfield_decl (tree field)
/* Extract the declared width of the bitfield, which has been /* Extract the declared width of the bitfield, which has been
temporarily stashed in DECL_INITIAL. */ temporarily stashed in DECL_INITIAL. */
w = DECL_INITIAL (field); w = DECL_INITIAL (field);
gcc_assert (w != NULL_TREE); gcc_assert (w != NULL_TREE);
/* Remove the bit-field width indicator so that the rest of the /* Remove the bit-field width indicator so that the rest of the
compiler does not treat that value as an initializer. */ compiler does not treat that value as an initializer. */
DECL_INITIAL (field) = NULL_TREE; DECL_INITIAL (field) = NULL_TREE;
...@@ -3040,13 +3040,13 @@ check_field_decls (tree t, tree *access_decls, ...@@ -3040,13 +3040,13 @@ check_field_decls (tree t, tree *access_decls,
if (! TYPE_HAS_INIT_REF (t)) if (! TYPE_HAS_INIT_REF (t))
{ {
warning (OPT_Weffc__, warning (OPT_Weffc__,
" but does not override %<%T(const %T&)%>", t, t); " but does not override %<%T(const %T&)%>", t, t);
if (!TYPE_HAS_ASSIGN_REF (t)) if (!TYPE_HAS_ASSIGN_REF (t))
warning (OPT_Weffc__, " or %<operator=(const %T&)%>", t); warning (OPT_Weffc__, " or %<operator=(const %T&)%>", t);
} }
else if (! TYPE_HAS_ASSIGN_REF (t)) else if (! TYPE_HAS_ASSIGN_REF (t))
warning (OPT_Weffc__, warning (OPT_Weffc__,
" but does not override %<operator=(const %T&)%>", t); " but does not override %<operator=(const %T&)%>", t);
} }
...@@ -3136,7 +3136,7 @@ walk_subobject_offsets (tree type, ...@@ -3136,7 +3136,7 @@ walk_subobject_offsets (tree type,
if (type == error_mark_node) if (type == error_mark_node)
return 0; return 0;
if (!TYPE_P (type)) if (!TYPE_P (type))
{ {
if (abi_version_at_least (2)) if (abi_version_at_least (2))
...@@ -3336,7 +3336,7 @@ record_subobject_offsets (tree type, ...@@ -3336,7 +3336,7 @@ record_subobject_offsets (tree type,
other empty classes might later be placed) or at the end of the other empty classes might later be placed) or at the end of the
class (where other objects might then be placed, so other empty class (where other objects might then be placed, so other empty
subobjects might later overlap). */ subobjects might later overlap). */
if (is_data_member if (is_data_member
|| !is_empty_class (BINFO_TYPE (type))) || !is_empty_class (BINFO_TYPE (type)))
max_offset = sizeof_biggest_empty_class; max_offset = sizeof_biggest_empty_class;
else else
...@@ -3503,7 +3503,7 @@ layout_empty_base (tree binfo, tree eoc, splay_tree offsets) ...@@ -3503,7 +3503,7 @@ layout_empty_base (tree binfo, tree eoc, splay_tree offsets)
(binfo, size_diffop (size_zero_node, BINFO_OFFSET (binfo))); (binfo, size_diffop (size_zero_node, BINFO_OFFSET (binfo)));
else else
warning (OPT_Wabi, warning (OPT_Wabi,
"offset of empty base %qT may not be ABI-compliant and may" "offset of empty base %qT may not be ABI-compliant and may"
"change in a future version of GCC", "change in a future version of GCC",
BINFO_TYPE (binfo)); BINFO_TYPE (binfo));
} }
...@@ -3616,7 +3616,7 @@ build_base_field (record_layout_info rli, tree binfo, ...@@ -3616,7 +3616,7 @@ build_base_field (record_layout_info rli, tree binfo,
CLASSTYPE_NEARLY_EMPTY_P (t) = 0; CLASSTYPE_NEARLY_EMPTY_P (t) = 0;
else else
warning (OPT_Wabi, warning (OPT_Wabi,
"class %qT will be considered nearly empty in a " "class %qT will be considered nearly empty in a "
"future version of GCC", t); "future version of GCC", t);
} }
} }
...@@ -4361,7 +4361,7 @@ layout_virtual_bases (record_layout_info rli, splay_tree offsets) ...@@ -4361,7 +4361,7 @@ layout_virtual_bases (record_layout_info rli, splay_tree offsets)
bitsize_unit_node), bitsize_unit_node),
BINFO_OFFSET (vbase)))) BINFO_OFFSET (vbase))))
warning (OPT_Wabi, warning (OPT_Wabi,
"offset of virtual base %qT is not ABI-compliant and " "offset of virtual base %qT is not ABI-compliant and "
"may change in a future version of GCC", "may change in a future version of GCC",
basetype); basetype);
...@@ -4691,7 +4691,7 @@ layout_class_type (tree t, tree *virtuals_p) ...@@ -4691,7 +4691,7 @@ layout_class_type (tree t, tree *virtuals_p)
/* Versions of G++ before G++ 3.4 did not reset the /* Versions of G++ before G++ 3.4 did not reset the
DECL_MODE. */ DECL_MODE. */
warning (OPT_Wabi, warning (OPT_Wabi,
"the offset of %qD may not be ABI-compliant and may " "the offset of %qD may not be ABI-compliant and may "
"change in a future version of GCC", field); "change in a future version of GCC", field);
} }
else else
...@@ -4735,9 +4735,9 @@ layout_class_type (tree t, tree *virtuals_p) ...@@ -4735,9 +4735,9 @@ layout_class_type (tree t, tree *virtuals_p)
/* The middle end uses the type of expressions to determine the /* The middle end uses the type of expressions to determine the
possible range of expression values. In order to optimize possible range of expression values. In order to optimize
"x.i > 7" to "false" for a 2-bit bitfield "i", the middle end "x.i > 7" to "false" for a 2-bit bitfield "i", the middle end
must be made aware of the width of "i", via its type. must be made aware of the width of "i", via its type.
Because C++ does not have integer types of arbitrary width, Because C++ does not have integer types of arbitrary width,
we must (for the purposes of the front end) convert from the we must (for the purposes of the front end) convert from the
type assigned here to the declared type of the bitfield type assigned here to the declared type of the bitfield
whenever a bitfield expression is used as an rvalue. whenever a bitfield expression is used as an rvalue.
...@@ -4750,8 +4750,8 @@ layout_class_type (tree t, tree *virtuals_p) ...@@ -4750,8 +4750,8 @@ layout_class_type (tree t, tree *virtuals_p)
ftype = TREE_TYPE (field); ftype = TREE_TYPE (field);
width = tree_low_cst (DECL_SIZE (field), /*unsignedp=*/1); width = tree_low_cst (DECL_SIZE (field), /*unsignedp=*/1);
if (width != TYPE_PRECISION (ftype)) if (width != TYPE_PRECISION (ftype))
TREE_TYPE (field) TREE_TYPE (field)
= c_build_bitfield_integer_type (width, = c_build_bitfield_integer_type (width,
TYPE_UNSIGNED (ftype)); TYPE_UNSIGNED (ftype));
} }
...@@ -4811,7 +4811,7 @@ layout_class_type (tree t, tree *virtuals_p) ...@@ -4811,7 +4811,7 @@ layout_class_type (tree t, tree *virtuals_p)
TYPE_SIZE_UNIT (base_t) = size_zero_node; TYPE_SIZE_UNIT (base_t) = size_zero_node;
if (warn_abi && !integer_zerop (rli_size_unit_so_far (rli))) if (warn_abi && !integer_zerop (rli_size_unit_so_far (rli)))
warning (OPT_Wabi, warning (OPT_Wabi,
"layout of classes derived from empty class %qT " "layout of classes derived from empty class %qT "
"may change in a future version of GCC", "may change in a future version of GCC",
t); t);
} }
...@@ -4907,7 +4907,7 @@ layout_class_type (tree t, tree *virtuals_p) ...@@ -4907,7 +4907,7 @@ layout_class_type (tree t, tree *virtuals_p)
splay_tree_delete (empty_base_offsets); splay_tree_delete (empty_base_offsets);
if (CLASSTYPE_EMPTY_P (t) if (CLASSTYPE_EMPTY_P (t)
&& tree_int_cst_lt (sizeof_biggest_empty_class, && tree_int_cst_lt (sizeof_biggest_empty_class,
TYPE_SIZE_UNIT (t))) TYPE_SIZE_UNIT (t)))
sizeof_biggest_empty_class = TYPE_SIZE_UNIT (t); sizeof_biggest_empty_class = TYPE_SIZE_UNIT (t);
} }
...@@ -5440,7 +5440,7 @@ pushclass (tree type) ...@@ -5440,7 +5440,7 @@ pushclass (tree type)
current_class_stack_size *= 2; current_class_stack_size *= 2;
current_class_stack current_class_stack
= XRESIZEVEC (struct class_stack_node, current_class_stack, = XRESIZEVEC (struct class_stack_node, current_class_stack,
current_class_stack_size); current_class_stack_size);
} }
/* Insert a new entry on the class stack. */ /* Insert a new entry on the class stack. */
...@@ -5855,7 +5855,7 @@ resolve_address_of_overloaded_function (tree target_type, ...@@ -5855,7 +5855,7 @@ resolve_address_of_overloaded_function (tree target_type,
build_ptrmemfunc_type (build_pointer_type (instantiation_type)); build_ptrmemfunc_type (build_pointer_type (instantiation_type));
else if (!is_reference) else if (!is_reference)
instantiation_type = build_pointer_type (instantiation_type); instantiation_type = build_pointer_type (instantiation_type);
if (can_convert_arg (target_type, instantiation_type, instantiation, if (can_convert_arg (target_type, instantiation_type, instantiation,
LOOKUP_NORMAL)) LOOKUP_NORMAL))
matches = tree_cons (instantiation, fn, matches); matches = tree_cons (instantiation, fn, matches);
} }
...@@ -5866,8 +5866,8 @@ resolve_address_of_overloaded_function (tree target_type, ...@@ -5866,8 +5866,8 @@ resolve_address_of_overloaded_function (tree target_type,
tree match = most_specialized_instantiation (matches); tree match = most_specialized_instantiation (matches);
if (match != error_mark_node) if (match != error_mark_node)
matches = tree_cons (TREE_PURPOSE (match), matches = tree_cons (TREE_PURPOSE (match),
NULL_TREE, NULL_TREE,
NULL_TREE); NULL_TREE);
} }
} }
...@@ -6231,7 +6231,7 @@ get_vfield_name (tree type) ...@@ -6231,7 +6231,7 @@ get_vfield_name (tree type)
type = BINFO_TYPE (binfo); type = BINFO_TYPE (binfo);
buf = (char *) alloca (sizeof (VFIELD_NAME_FORMAT) buf = (char *) alloca (sizeof (VFIELD_NAME_FORMAT)
+ TYPE_NAME_LENGTH (type) + 2); + TYPE_NAME_LENGTH (type) + 2);
sprintf (buf, VFIELD_NAME_FORMAT, sprintf (buf, VFIELD_NAME_FORMAT,
IDENTIFIER_POINTER (constructor_name (type))); IDENTIFIER_POINTER (constructor_name (type)));
return get_identifier (buf); return get_identifier (buf);
......
...@@ -320,7 +320,7 @@ gimplify_switch_stmt (tree *stmt_p) ...@@ -320,7 +320,7 @@ gimplify_switch_stmt (tree *stmt_p)
/* Hook into the middle of gimplifying an OMP_FOR node. This is required /* Hook into the middle of gimplifying an OMP_FOR node. This is required
in order to properly gimplify CONTINUE statements. Here we merely in order to properly gimplify CONTINUE statements. Here we merely
manage the continue stack; the rest of the job is performed by the manage the continue stack; the rest of the job is performed by the
regular gimplifier. */ regular gimplifier. */
static enum gimplify_status static enum gimplify_status
cp_gimplify_omp_for (tree *expr_p) cp_gimplify_omp_for (tree *expr_p)
...@@ -613,7 +613,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data) ...@@ -613,7 +613,7 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
if (is_invisiref_parm (stmt) if (is_invisiref_parm (stmt)
/* Don't dereference parms in a thunk, pass the references through. */ /* Don't dereference parms in a thunk, pass the references through. */
&& !(DECL_THUNK_P (current_function_decl) && !(DECL_THUNK_P (current_function_decl)
&& TREE_CODE (stmt) == PARM_DECL)) && TREE_CODE (stmt) == PARM_DECL))
{ {
*stmt_p = convert_from_reference (stmt); *stmt_p = convert_from_reference (stmt);
*walk_subtrees = 0; *walk_subtrees = 0;
......
...@@ -125,11 +125,11 @@ cp_init_ts (void) ...@@ -125,11 +125,11 @@ cp_init_ts (void)
tree_contains_struct[NAMESPACE_DECL][TS_DECL_WRTL] = 1; tree_contains_struct[NAMESPACE_DECL][TS_DECL_WRTL] = 1;
tree_contains_struct[USING_DECL][TS_DECL_WRTL] = 1; tree_contains_struct[USING_DECL][TS_DECL_WRTL] = 1;
tree_contains_struct[TEMPLATE_DECL][TS_DECL_WRTL] = 1; tree_contains_struct[TEMPLATE_DECL][TS_DECL_WRTL] = 1;
tree_contains_struct[NAMESPACE_DECL][TS_DECL_COMMON] = 1; tree_contains_struct[NAMESPACE_DECL][TS_DECL_COMMON] = 1;
tree_contains_struct[USING_DECL][TS_DECL_COMMON] = 1; tree_contains_struct[USING_DECL][TS_DECL_COMMON] = 1;
tree_contains_struct[TEMPLATE_DECL][TS_DECL_COMMON] = 1; tree_contains_struct[TEMPLATE_DECL][TS_DECL_COMMON] = 1;
tree_contains_struct[NAMESPACE_DECL][TS_DECL_MINIMAL] = 1; tree_contains_struct[NAMESPACE_DECL][TS_DECL_MINIMAL] = 1;
tree_contains_struct[USING_DECL][TS_DECL_MINIMAL] = 1; tree_contains_struct[USING_DECL][TS_DECL_MINIMAL] = 1;
tree_contains_struct[TEMPLATE_DECL][TS_DECL_MINIMAL] = 1; tree_contains_struct[TEMPLATE_DECL][TS_DECL_MINIMAL] = 1;
......
...@@ -203,19 +203,19 @@ has_c_linkage (tree decl) ...@@ -203,19 +203,19 @@ has_c_linkage (tree decl)
return DECL_EXTERN_C_P (decl); return DECL_EXTERN_C_P (decl);
} }
static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map))) static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map)))
htab_t shadowed_var_for_decl; htab_t shadowed_var_for_decl;
/* Lookup a shadowed var for FROM, and return it if we find one. */ /* Lookup a shadowed var for FROM, and return it if we find one. */
tree tree
decl_shadowed_for_var_lookup (tree from) decl_shadowed_for_var_lookup (tree from)
{ {
struct tree_map *h, in; struct tree_map *h, in;
in.from = from; in.from = from;
h = (struct tree_map *) htab_find_with_hash (shadowed_var_for_decl, &in, h = (struct tree_map *) htab_find_with_hash (shadowed_var_for_decl, &in,
htab_hash_pointer (from)); htab_hash_pointer (from));
if (h) if (h)
return h->to; return h->to;
return NULL_TREE; return NULL_TREE;
......
...@@ -179,7 +179,7 @@ struct diagnostic_context; ...@@ -179,7 +179,7 @@ struct diagnostic_context;
#define NON_THUNK_FUNCTION_CHECK(NODE) __extension__ \ #define NON_THUNK_FUNCTION_CHECK(NODE) __extension__ \
({ const tree __t = (NODE); \ ({ const tree __t = (NODE); \
if (TREE_CODE (__t) != FUNCTION_DECL && \ if (TREE_CODE (__t) != FUNCTION_DECL && \
TREE_CODE (__t) != TEMPLATE_DECL && __t->decl_common.lang_specific \ TREE_CODE (__t) != TEMPLATE_DECL && __t->decl_common.lang_specific \
&& __t->decl_common.lang_specific->decl_flags.thunk_p) \ && __t->decl_common.lang_specific->decl_flags.thunk_p) \
tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); \ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); \
__t; }) __t; })
...@@ -187,7 +187,7 @@ struct diagnostic_context; ...@@ -187,7 +187,7 @@ struct diagnostic_context;
({ const tree __t = (NODE); \ ({ const tree __t = (NODE); \
if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl_common.lang_specific \ if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl_common.lang_specific \
|| !__t->decl_common.lang_specific->decl_flags.thunk_p) \ || !__t->decl_common.lang_specific->decl_flags.thunk_p) \
tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); \ tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); \
__t; }) __t; })
#else #else
#define NON_THUNK_FUNCTION_CHECK(NODE) (NODE) #define NON_THUNK_FUNCTION_CHECK(NODE) (NODE)
...@@ -2090,7 +2090,7 @@ extern void decl_shadowed_for_var_insert (tree, tree); ...@@ -2090,7 +2090,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
case, DECL_TEMPLATE_INFO is a TREE_LIST, whose TREE_PURPOSE is the case, DECL_TEMPLATE_INFO is a TREE_LIST, whose TREE_PURPOSE is the
TEMPLATE_DECL of which this entity is a specialization. The TREE_ TEMPLATE_DECL of which this entity is a specialization. The TREE_
TREE_VALUE is the template arguments used to specialize the TREE_VALUE is the template arguments used to specialize the
template. template.
In general, DECL_TEMPLATE_INFO is non-NULL only if In general, DECL_TEMPLATE_INFO is non-NULL only if
DECL_USE_TEMPLATE is nonzero. However, for friends, we sometimes DECL_USE_TEMPLATE is nonzero. However, for friends, we sometimes
...@@ -2102,7 +2102,7 @@ extern void decl_shadowed_for_var_insert (tree, tree); ...@@ -2102,7 +2102,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
In this case, S<int>::f is, from the point of view of the compiler, In this case, S<int>::f is, from the point of view of the compiler,
an instantiation of a template -- but, from the point of view of an instantiation of a template -- but, from the point of view of
the language, each instantiation of S results in a wholly unrelated the language, each instantiation of S results in a wholly unrelated
global function f. */ global function f. */
#define DECL_TEMPLATE_INFO(NODE) \ #define DECL_TEMPLATE_INFO(NODE) \
(DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \ (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \
->decl_flags.u.template_info) ->decl_flags.u.template_info)
...@@ -2521,7 +2521,7 @@ extern void decl_shadowed_for_var_insert (tree, tree); ...@@ -2521,7 +2521,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
[basic.types] [basic.types]
An object type is a (possibly cv-qualified) type that is not a An object type is a (possibly cv-qualified) type that is not a
function type, not a reference type, and not a void type. function type, not a reference type, and not a void type.
Keep these checks in ascending order, for speed. */ Keep these checks in ascending order, for speed. */
#define TYPE_OBJ_P(NODE) \ #define TYPE_OBJ_P(NODE) \
...@@ -2992,12 +2992,12 @@ extern void decl_shadowed_for_var_insert (tree, tree); ...@@ -2992,12 +2992,12 @@ extern void decl_shadowed_for_var_insert (tree, tree);
#define OMP_FOR_GIMPLIFYING_P(NODE) \ #define OMP_FOR_GIMPLIFYING_P(NODE) \
(TREE_LANG_FLAG_0 (OMP_FOR_CHECK (NODE))) (TREE_LANG_FLAG_0 (OMP_FOR_CHECK (NODE)))
/* A language-specific token attached to the OpenMP data clauses to /* A language-specific token attached to the OpenMP data clauses to
hold code (or code fragments) related to ctors, dtors, and op=. hold code (or code fragments) related to ctors, dtors, and op=.
See semantics.c for details. */ See semantics.c for details. */
#define CP_OMP_CLAUSE_INFO(NODE) \ #define CP_OMP_CLAUSE_INFO(NODE) \
TREE_TYPE (OMP_CLAUSE_RANGE_CHECK (NODE, OMP_CLAUSE_PRIVATE, \ TREE_TYPE (OMP_CLAUSE_RANGE_CHECK (NODE, OMP_CLAUSE_PRIVATE, \
OMP_CLAUSE_COPYPRIVATE)) OMP_CLAUSE_COPYPRIVATE))
/* These macros provide convenient access to the various _STMT nodes /* These macros provide convenient access to the various _STMT nodes
created when parsing template declarations. */ created when parsing template declarations. */
...@@ -3793,8 +3793,8 @@ extern tree cp_fold_obj_type_ref (tree, tree); ...@@ -3793,8 +3793,8 @@ extern tree cp_fold_obj_type_ref (tree, tree);
extern void set_linkage_according_to_type (tree, tree); extern void set_linkage_according_to_type (tree, tree);
extern void determine_key_method (tree); extern void determine_key_method (tree);
extern void check_for_override (tree, tree); extern void check_for_override (tree, tree);
extern void push_class_stack (void); extern void push_class_stack (void);
extern void pop_class_stack (void); extern void pop_class_stack (void);
/* in cvt.c */ /* in cvt.c */
extern tree convert_to_reference (tree, tree, int, int, tree); extern tree convert_to_reference (tree, tree, int, int, tree);
...@@ -3855,7 +3855,7 @@ extern int cp_complete_array_type (tree *, tree, bool); ...@@ -3855,7 +3855,7 @@ extern int cp_complete_array_type (tree *, tree, bool);
extern tree build_ptrmemfunc_type (tree); extern tree build_ptrmemfunc_type (tree);
extern tree build_ptrmem_type (tree, tree); extern tree build_ptrmem_type (tree, tree);
/* the grokdeclarator prototype is in decl.h */ /* the grokdeclarator prototype is in decl.h */
extern tree build_this_parm (tree, cp_cv_quals); extern tree build_this_parm (tree, cp_cv_quals);
extern int copy_fn_p (tree); extern int copy_fn_p (tree);
extern tree get_scope_of_declarator (const cp_declarator *); extern tree get_scope_of_declarator (const cp_declarator *);
extern void grok_special_member_properties (tree); extern void grok_special_member_properties (tree);
...@@ -3913,7 +3913,7 @@ extern bool have_extern_spec; ...@@ -3913,7 +3913,7 @@ extern bool have_extern_spec;
/* in decl2.c */ /* in decl2.c */
extern bool check_java_method (tree); extern bool check_java_method (tree);
extern tree build_memfn_type (tree, tree, cp_cv_quals); extern tree build_memfn_type (tree, tree, cp_cv_quals);
extern void maybe_retrofit_in_chrg (tree); extern void maybe_retrofit_in_chrg (tree);
extern void maybe_make_one_only (tree); extern void maybe_make_one_only (tree);
extern void grokclassfn (tree, tree, extern void grokclassfn (tree, tree,
...@@ -3947,7 +3947,7 @@ extern tree cxx_callgraph_analyze_expr (tree *, int *, tree); ...@@ -3947,7 +3947,7 @@ extern tree cxx_callgraph_analyze_expr (tree *, int *, tree);
extern void mark_needed (tree); extern void mark_needed (tree);
extern bool decl_needed_p (tree); extern bool decl_needed_p (tree);
extern void note_vague_linkage_fn (tree); extern void note_vague_linkage_fn (tree);
extern tree build_artificial_parm (tree, tree); extern tree build_artificial_parm (tree, tree);
/* in error.c */ /* in error.c */
extern void init_error (void); extern void init_error (void);
...@@ -4165,7 +4165,7 @@ extern void stop_deferring_access_checks (void); ...@@ -4165,7 +4165,7 @@ extern void stop_deferring_access_checks (void);
extern void pop_deferring_access_checks (void); extern void pop_deferring_access_checks (void);
extern tree get_deferred_access_checks (void); extern tree get_deferred_access_checks (void);
extern void pop_to_parent_deferring_access_checks (void); extern void pop_to_parent_deferring_access_checks (void);
extern void perform_access_checks (tree); extern void perform_access_checks (tree);
extern void perform_deferred_access_checks (void); extern void perform_deferred_access_checks (void);
extern void perform_or_defer_access_check (tree, tree); extern void perform_or_defer_access_check (tree, tree);
extern int stmts_are_full_exprs_p (void); extern int stmts_are_full_exprs_p (void);
...@@ -4245,7 +4245,7 @@ extern tree finish_template_type (tree, tree, int); ...@@ -4245,7 +4245,7 @@ extern tree finish_template_type (tree, tree, int);
extern tree finish_base_specifier (tree, tree, bool); extern tree finish_base_specifier (tree, tree, bool);
extern void finish_member_declaration (tree); extern void finish_member_declaration (tree);
extern void qualified_name_lookup_error (tree, tree, tree); extern void qualified_name_lookup_error (tree, tree, tree);
extern void check_template_keyword (tree); extern void check_template_keyword (tree);
extern tree finish_id_expression (tree, tree, tree, extern tree finish_id_expression (tree, tree, tree,
cp_id_kind *, cp_id_kind *,
bool, bool, bool *, bool, bool, bool *,
...@@ -4307,7 +4307,7 @@ extern tree get_target_expr (tree); ...@@ -4307,7 +4307,7 @@ extern tree get_target_expr (tree);
extern tree build_cplus_array_type (tree, tree); extern tree build_cplus_array_type (tree, tree);
extern tree hash_tree_cons (tree, tree, tree); extern tree hash_tree_cons (tree, tree, tree);
extern tree hash_tree_chain (tree, tree); extern tree hash_tree_chain (tree, tree);
extern tree build_qualified_name (tree, tree, tree, bool); extern tree build_qualified_name (tree, tree, tree, bool);
extern int is_overloaded_fn (tree); extern int is_overloaded_fn (tree);
extern tree get_first_fn (tree); extern tree get_first_fn (tree);
extern tree ovl_cons (tree, tree); extern tree ovl_cons (tree, tree);
...@@ -4347,10 +4347,10 @@ extern int cp_cannot_inline_tree_fn (tree*); ...@@ -4347,10 +4347,10 @@ extern int cp_cannot_inline_tree_fn (tree*);
extern tree cp_add_pending_fn_decls (void*,tree); extern tree cp_add_pending_fn_decls (void*,tree);
extern int cp_auto_var_in_fn_p (tree,tree); extern int cp_auto_var_in_fn_p (tree,tree);
extern tree fold_if_not_in_template (tree); extern tree fold_if_not_in_template (tree);
extern tree rvalue (tree); extern tree rvalue (tree);
extern tree convert_bitfield_to_declared_type (tree); extern tree convert_bitfield_to_declared_type (tree);
extern tree cp_save_expr (tree); extern tree cp_save_expr (tree);
/* in typeck.c */ /* in typeck.c */
extern int string_conv_p (tree, tree, int); extern int string_conv_p (tree, tree, int);
extern tree cp_truthvalue_conversion (tree); extern tree cp_truthvalue_conversion (tree);
...@@ -4368,7 +4368,7 @@ extern tree cxx_sizeof_or_alignof_expr (tree, enum tree_code); ...@@ -4368,7 +4368,7 @@ extern tree cxx_sizeof_or_alignof_expr (tree, enum tree_code);
extern tree cxx_sizeof_or_alignof_type (tree, enum tree_code, bool); extern tree cxx_sizeof_or_alignof_type (tree, enum tree_code, bool);
#define cxx_sizeof_nowarn(T) cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, false) #define cxx_sizeof_nowarn(T) cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, false)
extern tree inline_conversion (tree); extern tree inline_conversion (tree);
extern tree is_bitfield_expr_with_lowered_type (tree); extern tree is_bitfield_expr_with_lowered_type (tree);
extern tree decay_conversion (tree); extern tree decay_conversion (tree);
extern tree build_class_member_access_expr (tree, tree, tree, bool); extern tree build_class_member_access_expr (tree, tree, tree, bool);
extern tree finish_class_member_access_expr (tree, tree, bool); extern tree finish_class_member_access_expr (tree, tree, bool);
...@@ -4393,7 +4393,7 @@ extern tree build_modify_expr (tree, enum tree_code, tree); ...@@ -4393,7 +4393,7 @@ extern tree build_modify_expr (tree, enum tree_code, tree);
extern tree convert_for_initialization (tree, tree, tree, int, extern tree convert_for_initialization (tree, tree, tree, int,
const char *, tree, int); const char *, tree, int);
extern int comp_ptr_ttypes (tree, tree); extern int comp_ptr_ttypes (tree, tree);
extern bool comp_ptr_ttypes_const (tree, tree); extern bool comp_ptr_ttypes_const (tree, tree);
extern int ptr_reasonably_similar (tree, tree); extern int ptr_reasonably_similar (tree, tree);
extern tree build_ptrmemfunc (tree, tree, int, bool); extern tree build_ptrmemfunc (tree, tree, int, bool);
extern int cp_type_quals (tree); extern int cp_type_quals (tree);
......
...@@ -300,12 +300,12 @@ pp_cxx_constant (cxx_pretty_printer *pp, tree t) ...@@ -300,12 +300,12 @@ pp_cxx_constant (cxx_pretty_printer *pp, tree t)
{ {
case STRING_CST: case STRING_CST:
{ {
const bool in_parens = PAREN_STRING_LITERAL_P (t); const bool in_parens = PAREN_STRING_LITERAL_P (t);
if (in_parens) if (in_parens)
pp_cxx_left_paren (pp); pp_cxx_left_paren (pp);
pp_c_constant (pp_c_base (pp), t); pp_c_constant (pp_c_base (pp), t);
if (in_parens) if (in_parens)
pp_cxx_right_paren (pp); pp_cxx_right_paren (pp);
} }
break; break;
...@@ -1757,7 +1757,7 @@ pp_cxx_namespace_alias_definition (cxx_pretty_printer *pp, tree t) ...@@ -1757,7 +1757,7 @@ pp_cxx_namespace_alias_definition (cxx_pretty_printer *pp, tree t)
pp_equal (pp); pp_equal (pp);
pp_cxx_whitespace (pp); pp_cxx_whitespace (pp);
if (DECL_CONTEXT (DECL_NAMESPACE_ALIAS (t))) if (DECL_CONTEXT (DECL_NAMESPACE_ALIAS (t)))
pp_cxx_nested_name_specifier (pp, pp_cxx_nested_name_specifier (pp,
DECL_CONTEXT (DECL_NAMESPACE_ALIAS (t))); DECL_CONTEXT (DECL_NAMESPACE_ALIAS (t)));
pp_cxx_qualified_id (pp, DECL_NAMESPACE_ALIAS (t)); pp_cxx_qualified_id (pp, DECL_NAMESPACE_ALIAS (t));
pp_cxx_semicolon (pp); pp_cxx_semicolon (pp);
...@@ -1803,8 +1803,7 @@ pp_cxx_template_parameter_list (cxx_pretty_printer *pp, tree t) ...@@ -1803,8 +1803,7 @@ pp_cxx_template_parameter_list (cxx_pretty_printer *pp, tree t)
typename identifier(opt) typename identifier(opt)
typename identifier(opt) = type-id typename identifier(opt) = type-id
template < template-parameter-list > class identifier(opt) template < template-parameter-list > class identifier(opt)
template < template-parameter-list > class identifier(opt) = template-name template < template-parameter-list > class identifier(opt) = template-name */
*/
static void static void
pp_cxx_template_parameter (cxx_pretty_printer *pp, tree t) pp_cxx_template_parameter (cxx_pretty_printer *pp, tree t)
......
...@@ -708,7 +708,7 @@ note_vague_linkage_var (tree var) ...@@ -708,7 +708,7 @@ note_vague_linkage_var (tree var)
The other parameters are as for cp_finish_decl. */ The other parameters are as for cp_finish_decl. */
void void
finish_static_data_member_decl (tree decl, finish_static_data_member_decl (tree decl,
tree init, bool init_const_expr_p, tree init, bool init_const_expr_p,
tree asmspec_tree, tree asmspec_tree,
int flags) int flags)
...@@ -753,7 +753,7 @@ finish_static_data_member_decl (tree decl, ...@@ -753,7 +753,7 @@ finish_static_data_member_decl (tree decl,
/* DECLARATOR and DECLSPECS correspond to a class member. The other /* DECLARATOR and DECLSPECS correspond to a class member. The other
parameters are as for cp_finish_decl. Return the DECL for the parameters are as for cp_finish_decl. Return the DECL for the
class member declared. */ class member declared. */
tree tree
grokfield (const cp_declarator *declarator, grokfield (const cp_declarator *declarator,
...@@ -907,7 +907,7 @@ grokfield (const cp_declarator *declarator, ...@@ -907,7 +907,7 @@ grokfield (const cp_declarator *declarator,
error ("%<asm%> specifiers are not permitted on non-static data members"); error ("%<asm%> specifiers are not permitted on non-static data members");
if (DECL_INITIAL (value) == error_mark_node) if (DECL_INITIAL (value) == error_mark_node)
init = error_mark_node; init = error_mark_node;
cp_finish_decl (value, init, /*init_const_expr_p=*/false, cp_finish_decl (value, init, /*init_const_expr_p=*/false,
NULL_TREE, flags); NULL_TREE, flags);
DECL_INITIAL (value) = init; DECL_INITIAL (value) = init;
DECL_IN_AGGR_P (value) = 1; DECL_IN_AGGR_P (value) = 1;
...@@ -917,9 +917,9 @@ grokfield (const cp_declarator *declarator, ...@@ -917,9 +917,9 @@ grokfield (const cp_declarator *declarator,
if (asmspec) if (asmspec)
set_user_assembler_name (value, asmspec); set_user_assembler_name (value, asmspec);
cp_finish_decl (value, cp_finish_decl (value,
/*init=*/NULL_TREE, /*init=*/NULL_TREE,
/*init_const_expr_p=*/false, /*init_const_expr_p=*/false,
asmspec_tree, flags); asmspec_tree, flags);
/* Pass friends back this way. */ /* Pass friends back this way. */
...@@ -1608,7 +1608,7 @@ determine_visibility (tree decl) ...@@ -1608,7 +1608,7 @@ determine_visibility (tree decl)
&& DECL_VISIBILITY_SPECIFIED (decl) && DECL_VISIBILITY_SPECIFIED (decl)
&& (!class_type || !CLASSTYPE_VISIBILITY_SPECIFIED (class_type))) && (!class_type || !CLASSTYPE_VISIBILITY_SPECIFIED (class_type)))
targetm.cxx.determine_class_data_visibility (decl); targetm.cxx.determine_class_data_visibility (decl);
} }
} }
static void static void
...@@ -2420,12 +2420,12 @@ one_static_initialization_or_destruction (tree decl, tree init, bool initp) ...@@ -2420,12 +2420,12 @@ one_static_initialization_or_destruction (tree decl, tree init, bool initp)
if (initp) if (initp)
{ {
if (init) if (init)
finish_expr_stmt (init); finish_expr_stmt (init);
/* If we're using __cxa_atexit, register a function that calls the /* If we're using __cxa_atexit, register a function that calls the
destructor for the object. */ destructor for the object. */
if (flag_use_cxa_atexit) if (flag_use_cxa_atexit)
finish_expr_stmt (register_dtor_fn (decl)); finish_expr_stmt (register_dtor_fn (decl));
} }
else else
finish_expr_stmt (build_cleanup (decl)); finish_expr_stmt (build_cleanup (decl));
...@@ -2498,7 +2498,7 @@ do_static_initialization_or_destruction (tree vars, bool initp) ...@@ -2498,7 +2498,7 @@ do_static_initialization_or_destruction (tree vars, bool initp)
node = TREE_CHAIN (node)) node = TREE_CHAIN (node))
/* Do one initialization or destruction. */ /* Do one initialization or destruction. */
one_static_initialization_or_destruction (TREE_VALUE (node), one_static_initialization_or_destruction (TREE_VALUE (node),
TREE_PURPOSE (node), initp); TREE_PURPOSE (node), initp);
/* Finish up the priority if-stmt body. */ /* Finish up the priority if-stmt body. */
finish_then_clause (priority_if_stmt); finish_then_clause (priority_if_stmt);
...@@ -2994,7 +2994,7 @@ cp_finish_file (void) ...@@ -2994,7 +2994,7 @@ cp_finish_file (void)
DECL_EXTERNAL appropriately, so there's no need to check DECL_EXTERNAL appropriately, so there's no need to check
again, and we do not want to clear DECL_EXTERNAL if a again, and we do not want to clear DECL_EXTERNAL if a
previous call to import_export_decl set it. previous call to import_export_decl set it.
This is done in a separate for cycle, because if some This is done in a separate for cycle, because if some
deferred function is contained in another deferred deferred function is contained in another deferred
function later in deferred_fns varray, function later in deferred_fns varray,
...@@ -3087,7 +3087,7 @@ cp_finish_file (void) ...@@ -3087,7 +3087,7 @@ cp_finish_file (void)
else else
{ {
/* If we have a ctor or this is obj-c++ and we need a static init, /* If we have a ctor or this is obj-c++ and we need a static init,
call generate_ctor_or_dtor_function. */ call generate_ctor_or_dtor_function. */
if (static_ctors || (c_dialect_objc () && objc_static_init_needed_p ())) if (static_ctors || (c_dialect_objc () && objc_static_init_needed_p ()))
generate_ctor_or_dtor_function (/*constructor_p=*/true, generate_ctor_or_dtor_function (/*constructor_p=*/true,
DEFAULT_INIT_PRIORITY, &locus); DEFAULT_INIT_PRIORITY, &locus);
...@@ -3116,7 +3116,7 @@ cp_finish_file (void) ...@@ -3116,7 +3116,7 @@ cp_finish_file (void)
if (VEC_length (tree, pending_statics) != 0) if (VEC_length (tree, pending_statics) != 0)
{ {
check_global_declarations (VEC_address (tree, pending_statics), check_global_declarations (VEC_address (tree, pending_statics),
VEC_length (tree, pending_statics)); VEC_length (tree, pending_statics));
emit_debug_global_declarations (VEC_address (tree, pending_statics), emit_debug_global_declarations (VEC_address (tree, pending_statics),
VEC_length (tree, pending_statics)); VEC_length (tree, pending_statics));
} }
...@@ -3251,7 +3251,7 @@ mark_used (tree decl) ...@@ -3251,7 +3251,7 @@ mark_used (tree decl)
} }
TREE_USED (decl) = 1; TREE_USED (decl) = 1;
/* If we don't need a value, then we don't need to synthesize DECL. */ /* If we don't need a value, then we don't need to synthesize DECL. */
if (skip_evaluation) if (skip_evaluation)
return; return;
/* Normally, we can wait until instantiation-time to synthesize /* Normally, we can wait until instantiation-time to synthesize
...@@ -3275,9 +3275,9 @@ mark_used (tree decl) ...@@ -3275,9 +3275,9 @@ mark_used (tree decl)
saved_processing_template_decl = processing_template_decl; saved_processing_template_decl = processing_template_decl;
processing_template_decl = 0; processing_template_decl = 0;
} }
if (processing_template_decl) if (processing_template_decl)
return; return;
if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl) if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)
&& !TREE_ASM_WRITTEN (decl)) && !TREE_ASM_WRITTEN (decl))
...@@ -3329,12 +3329,12 @@ mark_used (tree decl) ...@@ -3329,12 +3329,12 @@ mark_used (tree decl)
template, we now know that we will need to actually do the template, we now know that we will need to actually do the
instantiation. We check that DECL is not an explicit instantiation. We check that DECL is not an explicit
instantiation because that is not checked in instantiate_decl. instantiation because that is not checked in instantiate_decl.
We put off instantiating functions in order to improve compile We put off instantiating functions in order to improve compile
times. Maintaining a stack of active functions is expensive, times. Maintaining a stack of active functions is expensive,
and the inliner knows to instantiate any functions it might and the inliner knows to instantiate any functions it might
need. Therefore, we always try to defer instantiation. */ need. Therefore, we always try to defer instantiation. */
instantiate_decl (decl, /*defer_ok=*/true, instantiate_decl (decl, /*defer_ok=*/true,
/*expl_inst_class_mem_p=*/false); /*expl_inst_class_mem_p=*/false);
processing_template_decl = saved_processing_template_decl; processing_template_decl = saved_processing_template_decl;
......
...@@ -1396,9 +1396,9 @@ dump_expr (tree t, int flags) ...@@ -1396,9 +1396,9 @@ dump_expr (tree t, int flags)
if (TREE_CODE (fn) == ADDR_EXPR) if (TREE_CODE (fn) == ADDR_EXPR)
fn = TREE_OPERAND (fn, 0); fn = TREE_OPERAND (fn, 0);
/* Nobody is interested in seeing the guts of vcalls. */ /* Nobody is interested in seeing the guts of vcalls. */
if (TREE_CODE (fn) == OBJ_TYPE_REF) if (TREE_CODE (fn) == OBJ_TYPE_REF)
fn = resolve_virtual_fun_from_obj_type_ref (fn); fn = resolve_virtual_fun_from_obj_type_ref (fn);
if (TREE_TYPE (fn) != NULL_TREE && NEXT_CODE (fn) == METHOD_TYPE) if (TREE_TYPE (fn) != NULL_TREE && NEXT_CODE (fn) == METHOD_TYPE)
{ {
......
...@@ -444,7 +444,7 @@ expand_start_catch_block (tree decl) ...@@ -444,7 +444,7 @@ expand_start_catch_block (tree decl)
/* If the C++ object needs constructing, we need to do that before /* If the C++ object needs constructing, we need to do that before
calling __cxa_begin_catch, so that std::uncaught_exception gets calling __cxa_begin_catch, so that std::uncaught_exception gets
the right value during the copy constructor. */ the right value during the copy constructor. */
else if (flag_use_cxa_get_exception_ptr else if (flag_use_cxa_get_exception_ptr
&& TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl))) && TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)))
{ {
exp = do_get_exception_ptr (); exp = do_get_exception_ptr ();
...@@ -460,7 +460,7 @@ expand_start_catch_block (tree decl) ...@@ -460,7 +460,7 @@ expand_start_catch_block (tree decl)
tree init = do_begin_catch (); tree init = do_begin_catch ();
exp = create_temporary_var (ptr_type_node); exp = create_temporary_var (ptr_type_node);
DECL_REGISTER (exp) = 1; DECL_REGISTER (exp) = 1;
cp_finish_decl (exp, init, /*init_const_expr=*/false, cp_finish_decl (exp, init, /*init_const_expr=*/false,
NULL_TREE, LOOKUP_ONLYCONVERTING); NULL_TREE, LOOKUP_ONLYCONVERTING);
initialize_handler_parm (decl, exp); initialize_handler_parm (decl, exp);
} }
...@@ -664,9 +664,9 @@ build_throw (tree exp) ...@@ -664,9 +664,9 @@ build_throw (tree exp)
fn = push_throw_library_fn (fn, tmp); fn = push_throw_library_fn (fn, tmp);
} }
/* [except.throw] /* [except.throw]
A throw-expression initializes a temporary object, the type A throw-expression initializes a temporary object, the type
of which is determined by removing any top-level of which is determined by removing any top-level
cv-qualifiers from the static type of the operand of throw cv-qualifiers from the static type of the operand of throw
and adjusting the type from "array of T" or "function return and adjusting the type from "array of T" or "function return
...@@ -702,7 +702,7 @@ build_throw (tree exp) ...@@ -702,7 +702,7 @@ build_throw (tree exp)
if (CLASS_TYPE_P (temp_type)) if (CLASS_TYPE_P (temp_type))
{ {
/* Call the copy constructor. */ /* Call the copy constructor. */
exp = (build_special_member_call exp = (build_special_member_call
(object, complete_ctor_identifier, (object, complete_ctor_identifier,
build_tree_list (NULL_TREE, exp), build_tree_list (NULL_TREE, exp),
TREE_TYPE (object), TREE_TYPE (object),
...@@ -714,7 +714,7 @@ build_throw (tree exp) ...@@ -714,7 +714,7 @@ build_throw (tree exp)
} }
} }
else else
exp = build2 (INIT_EXPR, temp_type, object, exp = build2 (INIT_EXPR, temp_type, object,
decay_conversion (exp)); decay_conversion (exp));
/* Pre-evaluate the thrown expression first, since if we allocated /* Pre-evaluate the thrown expression first, since if we allocated
......
...@@ -1320,7 +1320,7 @@ build_offset_ref (tree type, tree member, bool address_p) ...@@ -1320,7 +1320,7 @@ build_offset_ref (tree type, tree member, bool address_p)
return member; return member;
if (dependent_type_p (type) || type_dependent_expression_p (member)) if (dependent_type_p (type) || type_dependent_expression_p (member))
return build_qualified_name (NULL_TREE, type, member, return build_qualified_name (NULL_TREE, type, member,
/*template_p=*/false); /*template_p=*/false);
gcc_assert (TYPE_P (type)); gcc_assert (TYPE_P (type));
...@@ -1339,7 +1339,7 @@ build_offset_ref (tree type, tree member, bool address_p) ...@@ -1339,7 +1339,7 @@ build_offset_ref (tree type, tree member, bool address_p)
} }
/* Entities other than non-static members need no further /* Entities other than non-static members need no further
processing. */ processing. */
if (TREE_CODE (member) == TYPE_DECL) if (TREE_CODE (member) == TYPE_DECL)
return member; return member;
if (TREE_CODE (member) == VAR_DECL || TREE_CODE (member) == CONST_DECL) if (TREE_CODE (member) == VAR_DECL || TREE_CODE (member) == CONST_DECL)
...@@ -1451,7 +1451,7 @@ static tree ...@@ -1451,7 +1451,7 @@ static tree
constant_value_1 (tree decl, bool integral_p) constant_value_1 (tree decl, bool integral_p)
{ {
while (TREE_CODE (decl) == CONST_DECL while (TREE_CODE (decl) == CONST_DECL
|| (integral_p || (integral_p
? DECL_INTEGRAL_CONSTANT_VAR_P (decl) ? DECL_INTEGRAL_CONSTANT_VAR_P (decl)
: (TREE_CODE (decl) == VAR_DECL : (TREE_CODE (decl) == VAR_DECL
&& CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl))))) && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl)))))
...@@ -1466,7 +1466,7 @@ constant_value_1 (tree decl, bool integral_p) ...@@ -1466,7 +1466,7 @@ constant_value_1 (tree decl, bool integral_p)
instantiation time. */ instantiation time. */
if (DECL_CLASS_SCOPE_P (decl) if (DECL_CLASS_SCOPE_P (decl)
&& CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (decl)) && CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (decl))
&& uses_template_parms (CLASSTYPE_TI_ARGS && uses_template_parms (CLASSTYPE_TI_ARGS
(DECL_CONTEXT (decl)))) (DECL_CONTEXT (decl))))
{ {
++processing_template_decl; ++processing_template_decl;
...@@ -1520,7 +1520,7 @@ integral_constant_value (tree decl) ...@@ -1520,7 +1520,7 @@ integral_constant_value (tree decl)
tree tree
decl_constant_value (tree decl) decl_constant_value (tree decl)
{ {
return constant_value_1 (decl, return constant_value_1 (decl,
/*integral_p=*/processing_template_decl); /*integral_p=*/processing_template_decl);
} }
...@@ -1548,9 +1548,9 @@ build_raw_new_expr (tree placement, tree type, tree nelts, tree init, ...@@ -1548,9 +1548,9 @@ build_raw_new_expr (tree placement, tree type, tree nelts, tree init,
int use_global_new) int use_global_new)
{ {
tree new_expr; tree new_expr;
new_expr = build4 (NEW_EXPR, build_pointer_type (type), placement, type, new_expr = build4 (NEW_EXPR, build_pointer_type (type), placement, type,
nelts, init); nelts, init);
NEW_EXPR_USE_GLOBAL (new_expr) = use_global_new; NEW_EXPR_USE_GLOBAL (new_expr) = use_global_new;
TREE_SIDE_EFFECTS (new_expr) = 1; TREE_SIDE_EFFECTS (new_expr) = 1;
...@@ -1565,7 +1565,6 @@ build_raw_new_expr (tree placement, tree type, tree nelts, tree init, ...@@ -1565,7 +1565,6 @@ build_raw_new_expr (tree placement, tree type, tree nelts, tree init,
static tree static tree
build_new_1 (tree placement, tree type, tree nelts, tree init, build_new_1 (tree placement, tree type, tree nelts, tree init,
bool globally_qualified_p) bool globally_qualified_p)
{ {
tree size, rval; tree size, rval;
/* True iff this is a call to "operator new[]" instead of just /* True iff this is a call to "operator new[]" instead of just
...@@ -1894,8 +1893,8 @@ build_new_1 (tree placement, tree type, tree nelts, tree init, ...@@ -1894,8 +1893,8 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
= build_vec_init (init_expr, = build_vec_init (init_expr,
cp_build_binary_op (MINUS_EXPR, outer_nelts, cp_build_binary_op (MINUS_EXPR, outer_nelts,
integer_one_node), integer_one_node),
init, init,
explicit_default_init_p, explicit_default_init_p,
/*from_array=*/0); /*from_array=*/0);
/* An array initialization is stable because the initialization /* An array initialization is stable because the initialization
...@@ -1920,14 +1919,14 @@ build_new_1 (tree placement, tree type, tree nelts, tree init, ...@@ -1920,14 +1919,14 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
{ {
/* We are processing something like `new int (10)', which /* We are processing something like `new int (10)', which
means allocate an int, and initialize it with 10. */ means allocate an int, and initialize it with 10. */
if (TREE_CODE (init) == TREE_LIST) if (TREE_CODE (init) == TREE_LIST)
init = build_x_compound_expr_from_list (init, init = build_x_compound_expr_from_list (init,
"new initializer"); "new initializer");
else else
gcc_assert (TREE_CODE (init) != CONSTRUCTOR gcc_assert (TREE_CODE (init) != CONSTRUCTOR
|| TREE_TYPE (init) != NULL_TREE); || TREE_TYPE (init) != NULL_TREE);
init_expr = build_modify_expr (init_expr, INIT_EXPR, init); init_expr = build_modify_expr (init_expr, INIT_EXPR, init);
stable = stabilize_init (init_expr, &init_preeval_expr); stable = stabilize_init (init_expr, &init_preeval_expr);
} }
...@@ -2098,7 +2097,7 @@ build_new (tree placement, tree type, tree nelts, tree init, ...@@ -2098,7 +2097,7 @@ build_new (tree placement, tree type, tree nelts, tree init,
array with no elements. The pointer returned by the array with no elements. The pointer returned by the
new-expression is non-null. [Note: If the library allocation new-expression is non-null. [Note: If the library allocation
function is called, the pointer returned is distinct from the function is called, the pointer returned is distinct from the
pointer to any other object.] pointer to any other object.]
However, that is not generally useful, so we issue a However, that is not generally useful, so we issue a
warning. */ warning. */
...@@ -2276,7 +2275,7 @@ build_vec_delete_1 (tree base, tree maxindex, tree type, ...@@ -2276,7 +2275,7 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
deallocate_expr = build_op_delete_call (VEC_DELETE_EXPR, deallocate_expr = build_op_delete_call (VEC_DELETE_EXPR,
base_tbd, virtual_size, base_tbd, virtual_size,
use_global_delete & 1, use_global_delete & 1,
/*placement=*/NULL_TREE, /*placement=*/NULL_TREE,
/*alloc_fn=*/NULL_TREE); /*alloc_fn=*/NULL_TREE);
} }
...@@ -2370,7 +2369,7 @@ get_temp_regvar (tree type, tree init) ...@@ -2370,7 +2369,7 @@ get_temp_regvar (tree type, tree init)
but use assignment instead of initialization. */ but use assignment instead of initialization. */
tree tree
build_vec_init (tree base, tree maxindex, tree init, build_vec_init (tree base, tree maxindex, tree init,
bool explicit_default_init_p, bool explicit_default_init_p,
int from_array) int from_array)
{ {
...@@ -2579,12 +2578,12 @@ build_vec_init (tree base, tree maxindex, tree init, ...@@ -2579,12 +2578,12 @@ build_vec_init (tree base, tree maxindex, tree init,
sorry sorry
("cannot initialize multi-dimensional array with initializer"); ("cannot initialize multi-dimensional array with initializer");
elt_init = build_vec_init (build1 (INDIRECT_REF, type, base), elt_init = build_vec_init (build1 (INDIRECT_REF, type, base),
0, 0, 0, 0,
/*explicit_default_init_p=*/false, /*explicit_default_init_p=*/false,
0); 0);
} }
else if (!TYPE_NEEDS_CONSTRUCTING (type)) else if (!TYPE_NEEDS_CONSTRUCTING (type))
elt_init = (build_modify_expr elt_init = (build_modify_expr
(to, INIT_EXPR, (to, INIT_EXPR,
build_zero_init (type, size_one_node, build_zero_init (type, size_one_node,
/*static_storage_p=*/false))); /*static_storage_p=*/false)));
...@@ -2763,8 +2762,8 @@ build_delete (tree type, tree addr, special_function_kind auto_delete, ...@@ -2763,8 +2762,8 @@ build_delete (tree type, tree addr, special_function_kind auto_delete,
if (auto_delete != sfk_deleting_destructor) if (auto_delete != sfk_deleting_destructor)
return void_zero_node; return void_zero_node;
return build_op_delete_call (DELETE_EXPR, addr, return build_op_delete_call (DELETE_EXPR, addr,
cxx_sizeof_nowarn (type), cxx_sizeof_nowarn (type),
use_global_delete, use_global_delete,
/*placement=*/NULL_TREE, /*placement=*/NULL_TREE,
/*alloc_fn=*/NULL_TREE); /*alloc_fn=*/NULL_TREE);
...@@ -2814,7 +2813,7 @@ build_delete (tree type, tree addr, special_function_kind auto_delete, ...@@ -2814,7 +2813,7 @@ build_delete (tree type, tree addr, special_function_kind auto_delete,
/* Make sure we have access to the member op delete, even though /* Make sure we have access to the member op delete, even though
we'll actually be calling it from the destructor. */ we'll actually be calling it from the destructor. */
build_op_delete_call (DELETE_EXPR, addr, cxx_sizeof_nowarn (type), build_op_delete_call (DELETE_EXPR, addr, cxx_sizeof_nowarn (type),
/*global_p=*/false, /*global_p=*/false,
/*placement=*/NULL_TREE, /*placement=*/NULL_TREE,
/*alloc_fn=*/NULL_TREE); /*alloc_fn=*/NULL_TREE);
} }
......
...@@ -44,9 +44,7 @@ ...@@ -44,9 +44,7 @@
mangle_vtbl_for_type: virtual table data mangle_vtbl_for_type: virtual table data
mangle_vtt_for_type: VTT data mangle_vtt_for_type: VTT data
mangle_ctor_vtbl_for_type: `C-in-B' constructor virtual table data mangle_ctor_vtbl_for_type: `C-in-B' constructor virtual table data
mangle_thunk: thunk function or entry mangle_thunk: thunk function or entry */
*/
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
...@@ -2741,8 +2739,7 @@ mangle_call_offset (const tree fixed_offset, const tree virtual_offset) ...@@ -2741,8 +2739,7 @@ mangle_call_offset (const tree fixed_offset, const tree virtual_offset)
<special-name> ::= T <call-offset> <base encoding> <special-name> ::= T <call-offset> <base encoding>
::= Tc <this_adjust call-offset> <result_adjust call-offset> ::= Tc <this_adjust call-offset> <result_adjust call-offset>
<base encoding> <base encoding> */
*/
tree tree
mangle_thunk (tree fn_decl, const int this_adjusting, tree fixed_offset, mangle_thunk (tree fn_decl, const int this_adjusting, tree fixed_offset,
......
...@@ -1077,7 +1077,7 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p) ...@@ -1077,7 +1077,7 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p)
DECL_ARGUMENTS (fn) = cp_build_parm_decl (NULL_TREE, rhs_parm_type); DECL_ARGUMENTS (fn) = cp_build_parm_decl (NULL_TREE, rhs_parm_type);
TREE_READONLY (DECL_ARGUMENTS (fn)) = 1; TREE_READONLY (DECL_ARGUMENTS (fn)) = 1;
} }
/* Add the "this" parameter. */ /* Add the "this" parameter. */
this_parm = build_this_parm (fn_type, TYPE_UNQUALIFIED); this_parm = build_this_parm (fn_type, TYPE_UNQUALIFIED);
TREE_CHAIN (this_parm) = DECL_ARGUMENTS (fn); TREE_CHAIN (this_parm) = DECL_ARGUMENTS (fn);
DECL_ARGUMENTS (fn) = this_parm; DECL_ARGUMENTS (fn) = this_parm;
......
...@@ -1100,11 +1100,11 @@ check_for_out_of_scope_variable (tree decl) ...@@ -1100,11 +1100,11 @@ check_for_out_of_scope_variable (tree decl)
if (!(TREE_CODE (decl) == VAR_DECL && DECL_DEAD_FOR_LOCAL (decl))) if (!(TREE_CODE (decl) == VAR_DECL && DECL_DEAD_FOR_LOCAL (decl)))
return decl; return decl;
shadowed = DECL_HAS_SHADOWED_FOR_VAR_P (decl) shadowed = DECL_HAS_SHADOWED_FOR_VAR_P (decl)
? DECL_SHADOWED_FOR_VAR (decl) : NULL_TREE ; ? DECL_SHADOWED_FOR_VAR (decl) : NULL_TREE ;
while (shadowed != NULL_TREE && TREE_CODE (shadowed) == VAR_DECL while (shadowed != NULL_TREE && TREE_CODE (shadowed) == VAR_DECL
&& DECL_DEAD_FOR_LOCAL (shadowed)) && DECL_DEAD_FOR_LOCAL (shadowed))
shadowed = DECL_HAS_SHADOWED_FOR_VAR_P (shadowed) shadowed = DECL_HAS_SHADOWED_FOR_VAR_P (shadowed)
? DECL_SHADOWED_FOR_VAR (shadowed) : NULL_TREE; ? DECL_SHADOWED_FOR_VAR (shadowed) : NULL_TREE;
if (!shadowed) if (!shadowed)
shadowed = IDENTIFIER_NAMESPACE_VALUE (DECL_NAME (decl)); shadowed = IDENTIFIER_NAMESPACE_VALUE (DECL_NAME (decl));
...@@ -2774,14 +2774,14 @@ do_class_using_decl (tree scope, tree name) ...@@ -2774,14 +2774,14 @@ do_class_using_decl (tree scope, tree name)
} }
scope_dependent_p = dependent_type_p (scope); scope_dependent_p = dependent_type_p (scope);
name_dependent_p = (scope_dependent_p name_dependent_p = (scope_dependent_p
|| (IDENTIFIER_TYPENAME_P (name) || (IDENTIFIER_TYPENAME_P (name)
&& dependent_type_p (TREE_TYPE (name)))); && dependent_type_p (TREE_TYPE (name))));
bases_dependent_p = false; bases_dependent_p = false;
if (processing_template_decl) if (processing_template_decl)
for (binfo = TYPE_BINFO (current_class_type), i = 0; for (binfo = TYPE_BINFO (current_class_type), i = 0;
BINFO_BASE_ITERATE (binfo, i, base_binfo); BINFO_BASE_ITERATE (binfo, i, base_binfo);
i++) i++)
if (dependent_type_p (TREE_TYPE (base_binfo))) if (dependent_type_p (TREE_TYPE (base_binfo)))
{ {
...@@ -2794,8 +2794,8 @@ do_class_using_decl (tree scope, tree name) ...@@ -2794,8 +2794,8 @@ do_class_using_decl (tree scope, tree name)
/* From [namespace.udecl]: /* From [namespace.udecl]:
A using-declaration used as a member-declaration shall refer to a A using-declaration used as a member-declaration shall refer to a
member of a base class of the class being defined. member of a base class of the class being defined.
In general, we cannot check this constraint in a template because In general, we cannot check this constraint in a template because
we do not know the entire set of base classes of the current we do not know the entire set of base classes of the current
class type. However, if all of the base classes are class type. However, if all of the base classes are
...@@ -2817,7 +2817,7 @@ do_class_using_decl (tree scope, tree name) ...@@ -2817,7 +2817,7 @@ do_class_using_decl (tree scope, tree name)
decl = lookup_member (binfo, name, 0, false); decl = lookup_member (binfo, name, 0, false);
if (!decl) if (!decl)
{ {
error ("no members matching %<%T::%D%> in %q#T", scope, name, error ("no members matching %<%T::%D%> in %q#T", scope, name,
scope); scope);
return NULL_TREE; return NULL_TREE;
} }
...@@ -4796,7 +4796,7 @@ pushtag (tree name, tree type, tag_scope scope) ...@@ -4796,7 +4796,7 @@ pushtag (tree name, tree type, tag_scope scope)
b = b->level_chain; b = b->level_chain;
gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE); gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE);
/* Do C++ gratuitous typedefing. */ /* Do C++ gratuitous typedefing. */
if (IDENTIFIER_TYPE_VALUE (name) != type) if (IDENTIFIER_TYPE_VALUE (name) != type)
{ {
...@@ -4807,7 +4807,7 @@ pushtag (tree name, tree type, tag_scope scope) ...@@ -4807,7 +4807,7 @@ pushtag (tree name, tree type, tag_scope scope)
if (! context) if (! context)
{ {
tree cs = current_scope (); tree cs = current_scope ();
if (scope == ts_current) if (scope == ts_current)
context = cs; context = cs;
else if (cs != NULL_TREE && TYPE_P (cs)) else if (cs != NULL_TREE && TYPE_P (cs))
...@@ -4844,7 +4844,7 @@ pushtag (tree name, tree type, tag_scope scope) ...@@ -4844,7 +4844,7 @@ pushtag (tree name, tree type, tag_scope scope)
(type, scope == ts_within_enclosing_non_class, b); (type, scope == ts_within_enclosing_non_class, b);
if (decl == error_mark_node) if (decl == error_mark_node)
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl); POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl);
if (! in_class) if (! in_class)
set_identifier_type_value_with_scope (name, tdef, b); set_identifier_type_value_with_scope (name, tdef, b);
...@@ -4879,11 +4879,11 @@ pushtag (tree name, tree type, tag_scope scope) ...@@ -4879,11 +4879,11 @@ pushtag (tree name, tree type, tag_scope scope)
{ {
maybe_add_class_template_decl_list (current_class_type, maybe_add_class_template_decl_list (current_class_type,
type, /*friend_p=*/0); type, /*friend_p=*/0);
if (CLASSTYPE_NESTED_UTDS (current_class_type) == NULL) if (CLASSTYPE_NESTED_UTDS (current_class_type) == NULL)
CLASSTYPE_NESTED_UTDS (current_class_type) CLASSTYPE_NESTED_UTDS (current_class_type)
= binding_table_new (SCOPE_DEFAULT_HT_SIZE); = binding_table_new (SCOPE_DEFAULT_HT_SIZE);
binding_table_insert binding_table_insert
(CLASSTYPE_NESTED_UTDS (current_class_type), name, type); (CLASSTYPE_NESTED_UTDS (current_class_type), name, type);
} }
......
...@@ -121,7 +121,7 @@ typedef enum scope_kind { ...@@ -121,7 +121,7 @@ typedef enum scope_kind {
specialization. Since, by definition, an specialization. Since, by definition, an
explicit specialization is introduced by explicit specialization is introduced by
"template <>", this scope is always empty. */ "template <>", this scope is always empty. */
sk_omp /* An OpenMP structured block. */ sk_omp /* An OpenMP structured block. */
} scope_kind; } scope_kind;
/* The scope where the class/struct/union/enum tag applies. */ /* The scope where the class/struct/union/enum tag applies. */
......
...@@ -172,7 +172,7 @@ cxx_print_xnode (FILE *file, tree node, int indent) ...@@ -172,7 +172,7 @@ cxx_print_xnode (FILE *file, tree node, int indent)
case BASELINK: case BASELINK:
print_node (file, "functions", BASELINK_FUNCTIONS (node), indent + 4); print_node (file, "functions", BASELINK_FUNCTIONS (node), indent + 4);
print_node (file, "binfo", BASELINK_BINFO (node), indent + 4); print_node (file, "binfo", BASELINK_BINFO (node), indent + 4);
print_node (file, "access_binfo", BASELINK_ACCESS_BINFO (node), print_node (file, "access_binfo", BASELINK_ACCESS_BINFO (node),
indent + 4); indent + 4);
break; break;
case OVERLOAD: case OVERLOAD:
......
...@@ -89,8 +89,8 @@ typedef enum tinfo_kind ...@@ -89,8 +89,8 @@ typedef enum tinfo_kind
TK_POINTER_MEMBER_TYPE, /* abi::__pointer_to_member_type_info */ TK_POINTER_MEMBER_TYPE, /* abi::__pointer_to_member_type_info */
TK_CLASS_TYPE, /* abi::__class_type_info */ TK_CLASS_TYPE, /* abi::__class_type_info */
TK_SI_CLASS_TYPE, /* abi::__si_class_type_info */ TK_SI_CLASS_TYPE, /* abi::__si_class_type_info */
TK_FIXED /* end of fixed descriptors. */ TK_FIXED /* end of fixed descriptors. */
/* ... abi::__vmi_type_info<I> */ /* ... abi::__vmi_type_info<I> */
} tinfo_kind; } tinfo_kind;
/* A vector of all tinfo decls that haven't yet been emitted. */ /* A vector of all tinfo decls that haven't yet been emitted. */
...@@ -865,7 +865,7 @@ tinfo_base_init (tinfo_s *ti, tree target) ...@@ -865,7 +865,7 @@ tinfo_base_init (tinfo_s *ti, tree target)
size_binop (MULT_EXPR, size_binop (MULT_EXPR,
size_int (2 * TARGET_VTABLE_DATA_ENTRY_DISTANCE), size_int (2 * TARGET_VTABLE_DATA_ENTRY_DISTANCE),
TYPE_SIZE_UNIT (vtable_entry_type))); TYPE_SIZE_UNIT (vtable_entry_type)));
ti->vtable = vtable_ptr; ti->vtable = vtable_ptr;
} }
...@@ -890,7 +890,7 @@ static tree ...@@ -890,7 +890,7 @@ static tree
generic_initializer (tinfo_s *ti, tree target) generic_initializer (tinfo_s *ti, tree target)
{ {
tree init = tinfo_base_init (ti, target); tree init = tinfo_base_init (ti, target);
init = build_constructor_from_list (NULL_TREE, init); init = build_constructor_from_list (NULL_TREE, init);
TREE_CONSTANT (init) = 1; TREE_CONSTANT (init) = 1;
TREE_INVARIANT (init) = 1; TREE_INVARIANT (init) = 1;
...@@ -949,7 +949,7 @@ ptm_initializer (tinfo_s *ti, tree target) ...@@ -949,7 +949,7 @@ ptm_initializer (tinfo_s *ti, tree target)
init = tree_cons (NULL_TREE, init = tree_cons (NULL_TREE,
get_tinfo_ptr (klass), get_tinfo_ptr (klass),
init); init);
init = build_constructor_from_list (NULL_TREE, nreverse (init)); init = build_constructor_from_list (NULL_TREE, nreverse (init));
TREE_CONSTANT (init) = 1; TREE_CONSTANT (init) = 1;
TREE_INVARIANT (init) = 1; TREE_INVARIANT (init) = 1;
...@@ -1007,16 +1007,16 @@ static tree ...@@ -1007,16 +1007,16 @@ static tree
get_pseudo_ti_init (tree type, unsigned tk_index) get_pseudo_ti_init (tree type, unsigned tk_index)
{ {
tinfo_s *ti = VEC_index (tinfo_s, tinfo_descs, tk_index); tinfo_s *ti = VEC_index (tinfo_s, tinfo_descs, tk_index);
gcc_assert (at_eof); gcc_assert (at_eof);
switch (tk_index) switch (tk_index)
{ {
case TK_POINTER_MEMBER_TYPE: case TK_POINTER_MEMBER_TYPE:
return ptm_initializer (ti, type); return ptm_initializer (ti, type);
case TK_POINTER_TYPE: case TK_POINTER_TYPE:
return ptr_initializer (ti, type); return ptr_initializer (ti, type);
case TK_BUILTIN_TYPE: case TK_BUILTIN_TYPE:
case TK_ENUMERAL_TYPE: case TK_ENUMERAL_TYPE:
case TK_FUNCTION_TYPE: case TK_FUNCTION_TYPE:
...@@ -1046,9 +1046,9 @@ get_pseudo_ti_init (tree type, unsigned tk_index) ...@@ -1046,9 +1046,9 @@ get_pseudo_ti_init (tree type, unsigned tk_index)
VEC(tree,gc) *base_accesses = BINFO_BASE_ACCESSES (binfo); VEC(tree,gc) *base_accesses = BINFO_BASE_ACCESSES (binfo);
tree base_inits = NULL_TREE; tree base_inits = NULL_TREE;
int ix; int ix;
gcc_assert (tk_index >= TK_FIXED); gcc_assert (tk_index >= TK_FIXED);
/* Generate the base information initializer. */ /* Generate the base information initializer. */
for (ix = nbases; ix--;) for (ix = nbases; ix--;)
{ {
...@@ -1057,21 +1057,21 @@ get_pseudo_ti_init (tree type, unsigned tk_index) ...@@ -1057,21 +1057,21 @@ get_pseudo_ti_init (tree type, unsigned tk_index)
int flags = 0; int flags = 0;
tree tinfo; tree tinfo;
tree offset; tree offset;
if (VEC_index (tree, base_accesses, ix) == access_public_node) if (VEC_index (tree, base_accesses, ix) == access_public_node)
flags |= 2; flags |= 2;
tinfo = get_tinfo_ptr (BINFO_TYPE (base_binfo)); tinfo = get_tinfo_ptr (BINFO_TYPE (base_binfo));
if (BINFO_VIRTUAL_P (base_binfo)) if (BINFO_VIRTUAL_P (base_binfo))
{ {
/* We store the vtable offset at which the virtual /* We store the vtable offset at which the virtual
base offset can be found. */ base offset can be found. */
offset = BINFO_VPTR_FIELD (base_binfo); offset = BINFO_VPTR_FIELD (base_binfo);
offset = convert (sizetype, offset); offset = convert (sizetype, offset);
flags |= 1; flags |= 1;
} }
else else
offset = BINFO_OFFSET (base_binfo); offset = BINFO_OFFSET (base_binfo);
/* Combine offset and flags into one field. */ /* Combine offset and flags into one field. */
offset = cp_build_binary_op (LSHIFT_EXPR, offset, offset = cp_build_binary_op (LSHIFT_EXPR, offset,
build_int_cst (NULL_TREE, 8)); build_int_cst (NULL_TREE, 8));
...@@ -1167,29 +1167,29 @@ static unsigned ...@@ -1167,29 +1167,29 @@ static unsigned
get_pseudo_ti_index (tree type) get_pseudo_ti_index (tree type)
{ {
unsigned ix; unsigned ix;
switch (TREE_CODE (type)) switch (TREE_CODE (type))
{ {
case OFFSET_TYPE: case OFFSET_TYPE:
ix = TK_POINTER_MEMBER_TYPE; ix = TK_POINTER_MEMBER_TYPE;
break; break;
case POINTER_TYPE: case POINTER_TYPE:
ix = TK_POINTER_TYPE; ix = TK_POINTER_TYPE;
break; break;
case ENUMERAL_TYPE: case ENUMERAL_TYPE:
ix = TK_ENUMERAL_TYPE; ix = TK_ENUMERAL_TYPE;
break; break;
case FUNCTION_TYPE: case FUNCTION_TYPE:
ix = TK_FUNCTION_TYPE; ix = TK_FUNCTION_TYPE;
break; break;
case ARRAY_TYPE: case ARRAY_TYPE:
ix = TK_ARRAY_TYPE; ix = TK_ARRAY_TYPE;
break; break;
case UNION_TYPE: case UNION_TYPE:
case RECORD_TYPE: case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (type)) if (TYPE_PTRMEMFUNC_P (type))
...@@ -1235,7 +1235,7 @@ get_pseudo_ti_index (tree type) ...@@ -1235,7 +1235,7 @@ get_pseudo_ti_index (tree type)
{ {
/* too short, extend. */ /* too short, extend. */
unsigned len = VEC_length (tinfo_s, tinfo_descs); unsigned len = VEC_length (tinfo_s, tinfo_descs);
VEC_safe_grow (tinfo_s, gc, tinfo_descs, ix + 1); VEC_safe_grow (tinfo_s, gc, tinfo_descs, ix + 1);
while (VEC_iterate (tinfo_s, tinfo_descs, len++, ti)) while (VEC_iterate (tinfo_s, tinfo_descs, len++, ti))
ti->type = ti->vtable = ti->name = NULL_TREE; ti->type = ti->vtable = ti->name = NULL_TREE;
...@@ -1282,11 +1282,11 @@ static void ...@@ -1282,11 +1282,11 @@ static void
create_tinfo_types (void) create_tinfo_types (void)
{ {
tinfo_s *ti; tinfo_s *ti;
gcc_assert (!tinfo_descs); gcc_assert (!tinfo_descs);
VEC_safe_grow (tinfo_s, gc, tinfo_descs, TK_FIXED); VEC_safe_grow (tinfo_s, gc, tinfo_descs, TK_FIXED);
push_nested_namespace (abi_node); push_nested_namespace (abi_node);
/* Create the internal type_info structure. This is used as a base for /* Create the internal type_info structure. This is used as a base for
...@@ -1317,15 +1317,15 @@ create_tinfo_types (void) ...@@ -1317,15 +1317,15 @@ create_tinfo_types (void)
create_pseudo_type_info (TK_ARRAY_TYPE, "__array_type_info", NULL); create_pseudo_type_info (TK_ARRAY_TYPE, "__array_type_info", NULL);
create_pseudo_type_info (TK_FUNCTION_TYPE, "__function_type_info", NULL); create_pseudo_type_info (TK_FUNCTION_TYPE, "__function_type_info", NULL);
create_pseudo_type_info (TK_ENUMERAL_TYPE, "__enum_type_info", NULL); create_pseudo_type_info (TK_ENUMERAL_TYPE, "__enum_type_info", NULL);
/* Class type_info. No additional fields. */ /* Class type_info. No additional fields. */
create_pseudo_type_info (TK_CLASS_TYPE, "__class_type_info", NULL); create_pseudo_type_info (TK_CLASS_TYPE, "__class_type_info", NULL);
/* Single public non-virtual base class. Add pointer to base class. /* Single public non-virtual base class. Add pointer to base class.
This is really a descendant of __class_type_info. */ This is really a descendant of __class_type_info. */
create_pseudo_type_info (TK_SI_CLASS_TYPE, "__si_class_type_info", create_pseudo_type_info (TK_SI_CLASS_TYPE, "__si_class_type_info",
build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type), build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
NULL); NULL);
/* Base class internal helper. Pointer to base type, offset to base, /* Base class internal helper. Pointer to base type, offset to base,
flags. */ flags. */
...@@ -1338,9 +1338,9 @@ create_tinfo_types (void) ...@@ -1338,9 +1338,9 @@ create_tinfo_types (void)
field = build_decl (FIELD_DECL, NULL_TREE, integer_types[itk_long]); field = build_decl (FIELD_DECL, NULL_TREE, integer_types[itk_long]);
TREE_CHAIN (field) = fields; TREE_CHAIN (field) = fields;
fields = field; fields = field;
ti = VEC_index (tinfo_s, tinfo_descs, TK_BASE_TYPE); ti = VEC_index (tinfo_s, tinfo_descs, TK_BASE_TYPE);
ti->type = make_aggr_type (RECORD_TYPE); ti->type = make_aggr_type (RECORD_TYPE);
ti->vtable = NULL_TREE; ti->vtable = NULL_TREE;
ti->name = NULL_TREE; ti->name = NULL_TREE;
...@@ -1362,10 +1362,10 @@ create_tinfo_types (void) ...@@ -1362,10 +1362,10 @@ create_tinfo_types (void)
This is really a descendant of __pbase_type_info. */ This is really a descendant of __pbase_type_info. */
create_pseudo_type_info (TK_POINTER_MEMBER_TYPE, create_pseudo_type_info (TK_POINTER_MEMBER_TYPE,
"__pointer_to_member_type_info", "__pointer_to_member_type_info",
build_decl (FIELD_DECL, NULL_TREE, integer_type_node), build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type), build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type), build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
NULL); NULL);
pop_nested_namespace (abi_node); pop_nested_namespace (abi_node);
} }
...@@ -1482,7 +1482,7 @@ emit_tinfo_decl (tree decl) ...@@ -1482,7 +1482,7 @@ emit_tinfo_decl (tree decl)
if (DECL_NOT_REALLY_EXTERN (decl) && decl_needed_p (decl)) if (DECL_NOT_REALLY_EXTERN (decl) && decl_needed_p (decl))
{ {
tree init; tree init;
DECL_EXTERNAL (decl) = 0; DECL_EXTERNAL (decl) = 0;
init = get_pseudo_ti_init (type, get_pseudo_ti_index (type)); init = get_pseudo_ti_init (type, get_pseudo_ti_index (type));
DECL_INITIAL (decl) = init; DECL_INITIAL (decl) = init;
......
...@@ -875,8 +875,8 @@ accessible_p (tree type, tree decl, bool consider_local_p) ...@@ -875,8 +875,8 @@ accessible_p (tree type, tree decl, bool consider_local_p)
instantiation. However, PROCESSING_TEMPLATE_DECL is set in the instantiation. However, PROCESSING_TEMPLATE_DECL is set in the
parameter list for a template (because we may see dependent types parameter list for a template (because we may see dependent types
in default arguments for template parameters), and access in default arguments for template parameters), and access
checking should be performed in the outermost parameter list. */ checking should be performed in the outermost parameter list. */
if (processing_template_decl if (processing_template_decl
&& (!processing_template_parmlist || processing_template_decl > 1)) && (!processing_template_parmlist || processing_template_decl > 1))
return 1; return 1;
......
...@@ -1212,17 +1212,17 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands, ...@@ -1212,17 +1212,17 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
if (!lvalue_or_else (operand, lv_asm)) if (!lvalue_or_else (operand, lv_asm))
operand = error_mark_node; operand = error_mark_node;
if (operand != error_mark_node if (operand != error_mark_node
&& (TREE_READONLY (operand) && (TREE_READONLY (operand)
|| CP_TYPE_CONST_P (TREE_TYPE (operand)) || CP_TYPE_CONST_P (TREE_TYPE (operand))
/* Functions are not modifiable, even though they are /* Functions are not modifiable, even though they are
lvalues. */ lvalues. */
|| TREE_CODE (TREE_TYPE (operand)) == FUNCTION_TYPE || TREE_CODE (TREE_TYPE (operand)) == FUNCTION_TYPE
|| TREE_CODE (TREE_TYPE (operand)) == METHOD_TYPE || TREE_CODE (TREE_TYPE (operand)) == METHOD_TYPE
/* If it's an aggregate and any field is const, then it is /* If it's an aggregate and any field is const, then it is
effectively const. */ effectively const. */
|| (CLASS_TYPE_P (TREE_TYPE (operand)) || (CLASS_TYPE_P (TREE_TYPE (operand))
&& C_TYPE_FIELDS_READONLY (TREE_TYPE (operand))))) && C_TYPE_FIELDS_READONLY (TREE_TYPE (operand)))))
readonly_error (operand, "assignment (via 'asm' output)", 0); readonly_error (operand, "assignment (via 'asm' output)", 0);
constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t))); constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
...@@ -1517,10 +1517,10 @@ check_accessibility_of_qualified_id (tree decl, ...@@ -1517,10 +1517,10 @@ check_accessibility_of_qualified_id (tree decl,
is true iff this qualified name appears as a template argument. */ is true iff this qualified name appears as a template argument. */
tree tree
finish_qualified_id_expr (tree qualifying_class, finish_qualified_id_expr (tree qualifying_class,
tree expr, tree expr,
bool done, bool done,
bool address_p, bool address_p,
bool template_p, bool template_p,
bool template_arg_p) bool template_arg_p)
{ {
...@@ -1603,7 +1603,7 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr) ...@@ -1603,7 +1603,7 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr)
return error_mark_node; return error_mark_node;
/* If the last statement does not have "void" type, then the value /* If the last statement does not have "void" type, then the value
of the last statement is the value of the entire expression. */ of the last statement is the value of the entire expression. */
if (expr) if (expr)
{ {
tree type; tree type;
...@@ -1633,9 +1633,9 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr) ...@@ -1633,9 +1633,9 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr)
statement-expression. */ statement-expression. */
if (!processing_template_decl && !VOID_TYPE_P (type)) if (!processing_template_decl && !VOID_TYPE_P (type))
{ {
tree target_expr; tree target_expr;
if (CLASS_TYPE_P (type) if (CLASS_TYPE_P (type)
&& !TYPE_HAS_TRIVIAL_INIT_REF (type)) && !TYPE_HAS_TRIVIAL_INIT_REF (type))
{ {
target_expr = build_target_expr_with_type (expr, type); target_expr = build_target_expr_with_type (expr, type);
expr = TARGET_EXPR_INITIAL (target_expr); expr = TARGET_EXPR_INITIAL (target_expr);
...@@ -1648,7 +1648,7 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr) ...@@ -1648,7 +1648,7 @@ finish_stmt_expr_expr (tree expr, tree stmt_expr)
problem described above. */ problem described above. */
target_expr = force_target_expr (type, expr); target_expr = force_target_expr (type, expr);
expr = TARGET_EXPR_INITIAL (target_expr); expr = TARGET_EXPR_INITIAL (target_expr);
expr = build2 (INIT_EXPR, expr = build2 (INIT_EXPR,
type, type,
TARGET_EXPR_SLOT (target_expr), TARGET_EXPR_SLOT (target_expr),
expr); expr);
...@@ -2043,7 +2043,7 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list) ...@@ -2043,7 +2043,7 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list)
{ {
/* If this compound-literal appears outside of a function, then /* If this compound-literal appears outside of a function, then
the corresponding variable has static storage duration, just the corresponding variable has static storage duration, just
like the variable in whose initializer it appears. */ like the variable in whose initializer it appears. */
TREE_STATIC (var) = 1; TREE_STATIC (var) = 1;
/* The variable has internal linkage, since there is no need to /* The variable has internal linkage, since there is no need to
reference it from another translation unit. */ reference it from another translation unit. */
...@@ -2056,7 +2056,7 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list) ...@@ -2056,7 +2056,7 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list)
pushdecl (var); pushdecl (var);
/* Initialize the variable as we would any other variable with a /* Initialize the variable as we would any other variable with a
brace-enclosed initializer. */ brace-enclosed initializer. */
cp_finish_decl (var, compound_literal, cp_finish_decl (var, compound_literal,
/*init_const_expr_p=*/false, /*init_const_expr_p=*/false,
/*asmspec_tree=*/NULL_TREE, /*asmspec_tree=*/NULL_TREE,
LOOKUP_ONLYCONVERTING); LOOKUP_ONLYCONVERTING);
...@@ -3603,7 +3603,7 @@ finish_omp_clauses (tree clauses) ...@@ -3603,7 +3603,7 @@ finish_omp_clauses (tree clauses)
inner_type, LOOKUP_NORMAL); inner_type, LOOKUP_NORMAL);
/* We'll have called convert_from_reference on the call, which /* We'll have called convert_from_reference on the call, which
may well have added an indirect_ref. It's unneeded here, may well have added an indirect_ref. It's unneeded here,
and in the way, so kill it. */ and in the way, so kill it. */
if (TREE_CODE (t) == INDIRECT_REF) if (TREE_CODE (t) == INDIRECT_REF)
t = TREE_OPERAND (t, 0); t = TREE_OPERAND (t, 0);
...@@ -3811,9 +3811,9 @@ finish_omp_for (location_t locus, tree decl, tree init, tree cond, ...@@ -3811,9 +3811,9 @@ finish_omp_for (location_t locus, tree decl, tree init, tree cond,
void void
finish_omp_atomic (enum tree_code code, tree lhs, tree rhs) finish_omp_atomic (enum tree_code code, tree lhs, tree rhs)
{ {
/* If either of the operands are dependent, we can't do semantic /* If either of the operands are dependent, we can't do semantic
processing yet. Stuff the values away for now. We cheat a bit processing yet. Stuff the values away for now. We cheat a bit
and use the same tree code for this, even though the operands and use the same tree code for this, even though the operands
are of totally different form, thus we need to remember which are of totally different form, thus we need to remember which
statements are which, thus the lang_flag bit. */ statements are which, thus the lang_flag bit. */
/* ??? We ought to be using type_dependent_expression_p, but the /* ??? We ought to be using type_dependent_expression_p, but the
......
...@@ -825,7 +825,7 @@ debug_binfo (tree elem) ...@@ -825,7 +825,7 @@ debug_binfo (tree elem)
the type of the result expression, if known, or NULL_TREE if the the type of the result expression, if known, or NULL_TREE if the
resulting expression is type-dependent. If TEMPLATE_P is true, resulting expression is type-dependent. If TEMPLATE_P is true,
NAME is known to be a template because the user explicitly used the NAME is known to be a template because the user explicitly used the
"template" keyword after the "::". "template" keyword after the "::".
All SCOPE_REFs should be built by use of this function. */ All SCOPE_REFs should be built by use of this function. */
...@@ -2170,8 +2170,8 @@ decl_linkage (tree decl) ...@@ -2170,8 +2170,8 @@ decl_linkage (tree decl)
/* Things that are TREE_PUBLIC have external linkage. */ /* Things that are TREE_PUBLIC have external linkage. */
if (TREE_PUBLIC (decl)) if (TREE_PUBLIC (decl))
return lk_external; return lk_external;
/* Linkage of a CONST_DECL depends on the linkage of the enumeration /* Linkage of a CONST_DECL depends on the linkage of the enumeration
type. */ type. */
if (TREE_CODE (decl) == CONST_DECL) if (TREE_CODE (decl) == CONST_DECL)
return decl_linkage (TYPE_NAME (TREE_TYPE (decl))); return decl_linkage (TYPE_NAME (TREE_TYPE (decl)));
......
...@@ -1318,7 +1318,7 @@ static tree ...@@ -1318,7 +1318,7 @@ static tree
cxx_alignof_expr (tree e) cxx_alignof_expr (tree e)
{ {
tree t; tree t;
if (e == error_mark_node) if (e == error_mark_node)
return error_mark_node; return error_mark_node;
...@@ -1505,7 +1505,7 @@ decay_conversion (tree exp) ...@@ -1505,7 +1505,7 @@ decay_conversion (tree exp)
adr = build_unary_op (ADDR_EXPR, exp, 1); adr = build_unary_op (ADDR_EXPR, exp, 1);
return cp_convert (ptrtype, adr); return cp_convert (ptrtype, adr);
} }
/* If a bitfield is used in a context where integral promotion /* If a bitfield is used in a context where integral promotion
applies, then the caller is expected to have used applies, then the caller is expected to have used
default_conversion. That function promotes bitfields correctly default_conversion. That function promotes bitfields correctly
...@@ -1546,7 +1546,7 @@ default_conversion (tree exp) ...@@ -1546,7 +1546,7 @@ default_conversion (tree exp)
{ {
/* Perform the integral promotions first so that bitfield /* Perform the integral promotions first so that bitfield
expressions (which may promote to "int", even if the bitfield is expressions (which may promote to "int", even if the bitfield is
declared "unsigned") are promoted correctly. */ declared "unsigned") are promoted correctly. */
if (INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (exp))) if (INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (exp)))
exp = perform_integral_promotions (exp); exp = perform_integral_promotions (exp);
/* Perform the other conversions. */ /* Perform the other conversions. */
...@@ -1990,8 +1990,8 @@ check_template_keyword (tree decl) ...@@ -1990,8 +1990,8 @@ check_template_keyword (tree decl)
template, the program is ill-formed. template, the program is ill-formed.
DR 228 removed the restriction that the template be a member DR 228 removed the restriction that the template be a member
template. template.
DR 96, if accepted would add the further restriction that explicit DR 96, if accepted would add the further restriction that explicit
template arguments must be provided if the template keyword is template arguments must be provided if the template keyword is
used, but, as of 2005-10-16, that DR is still in "drafting". If used, but, as of 2005-10-16, that DR is still in "drafting". If
...@@ -2199,7 +2199,7 @@ finish_class_member_access_expr (tree object, tree name, bool template_p) ...@@ -2199,7 +2199,7 @@ finish_class_member_access_expr (tree object, tree name, bool template_p)
orig_object, orig_name, orig_object, orig_name,
NULL_TREE); NULL_TREE);
} }
return expr; return expr;
} }
...@@ -3215,8 +3215,8 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, ...@@ -3215,8 +3215,8 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
case EQ_EXPR: case EQ_EXPR:
case NE_EXPR: case NE_EXPR:
if (code0 == REAL_TYPE || code1 == REAL_TYPE) if (code0 == REAL_TYPE || code1 == REAL_TYPE)
warning (OPT_Wfloat_equal, warning (OPT_Wfloat_equal,
"comparing floating point with == or != is unsafe"); "comparing floating point with == or != is unsafe");
if ((TREE_CODE (orig_op0) == STRING_CST && !integer_zerop (op1)) if ((TREE_CODE (orig_op0) == STRING_CST && !integer_zerop (op1))
|| (TREE_CODE (orig_op1) == STRING_CST && !integer_zerop (op0))) || (TREE_CODE (orig_op1) == STRING_CST && !integer_zerop (op0)))
warning (OPT_Wstring_literal_comparison, warning (OPT_Wstring_literal_comparison,
...@@ -5711,7 +5711,7 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs) ...@@ -5711,7 +5711,7 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
from_array = TREE_CODE (TREE_TYPE (newrhs)) == ARRAY_TYPE from_array = TREE_CODE (TREE_TYPE (newrhs)) == ARRAY_TYPE
? 1 + (modifycode != INIT_EXPR): 0; ? 1 + (modifycode != INIT_EXPR): 0;
return build_vec_init (lhs, NULL_TREE, newrhs, return build_vec_init (lhs, NULL_TREE, newrhs,
/*explicit_default_init_p=*/false, /*explicit_default_init_p=*/false,
from_array); from_array);
} }
...@@ -6201,7 +6201,7 @@ convert_for_assignment (tree type, tree rhs, ...@@ -6201,7 +6201,7 @@ convert_for_assignment (tree type, tree rhs,
"%s might be a candidate for a format attribute", "%s might be a candidate for a format attribute",
errtype); errtype);
} }
return perform_implicit_conversion (strip_top_quals (type), rhs); return perform_implicit_conversion (strip_top_quals (type), rhs);
} }
...@@ -6421,8 +6421,8 @@ check_return_expr (tree retval, bool *no_warning) ...@@ -6421,8 +6421,8 @@ check_return_expr (tree retval, bool *no_warning)
return!). */ return!). */
current_function_returns_null = 0; current_function_returns_null = 0;
/* And signal caller that TREE_NO_WARNING should be set on the /* And signal caller that TREE_NO_WARNING should be set on the
RETURN_EXPR to avoid control reaches end of non-void function RETURN_EXPR to avoid control reaches end of non-void function
warnings in tree-cfg.c. */ warnings in tree-cfg.c. */
*no_warning = true; *no_warning = true;
} }
/* Check for a return statement with a value in a function that /* Check for a return statement with a value in a function that
...@@ -6551,7 +6551,7 @@ check_return_expr (tree retval, bool *no_warning) ...@@ -6551,7 +6551,7 @@ check_return_expr (tree retval, bool *no_warning)
was an incomplete type. Just treat this as 'return;' */ was an incomplete type. Just treat this as 'return;' */
if (VOID_TYPE_P (functype)) if (VOID_TYPE_P (functype))
return error_mark_node; return error_mark_node;
/* First convert the value to the function's return type, then /* First convert the value to the function's return type, then
to the type of return value's location to handle the to the type of return value's location to handle the
case that functype is smaller than the valtype. */ case that functype is smaller than the valtype. */
......
...@@ -839,7 +839,7 @@ process_init_constructor_array (tree type, tree init) ...@@ -839,7 +839,7 @@ process_init_constructor_array (tree type, tree init)
add anything to the CONSTRUCTOR. */ add anything to the CONSTRUCTOR. */
break; break;
flags |= picflag_from_initializer (next); flags |= picflag_from_initializer (next);
CONSTRUCTOR_APPEND_ELT (v, size_int (i), next); CONSTRUCTOR_APPEND_ELT (v, size_int (i), next);
} }
...@@ -894,7 +894,7 @@ process_init_constructor_record (tree type, tree init) ...@@ -894,7 +894,7 @@ process_init_constructor_record (tree type, tree init)
gcc_assert (TREE_CODE (ce->index) == FIELD_DECL gcc_assert (TREE_CODE (ce->index) == FIELD_DECL
|| TREE_CODE (ce->index) == IDENTIFIER_NODE); || TREE_CODE (ce->index) == IDENTIFIER_NODE);
if (ce->index != field if (ce->index != field
&& ce->index != DECL_NAME (field)) && ce->index != DECL_NAME (field))
sorry ("non-trivial designated initializers not supported"); sorry ("non-trivial designated initializers not supported");
} }
...@@ -1021,7 +1021,7 @@ process_init_constructor_union (tree type, tree init) ...@@ -1021,7 +1021,7 @@ process_init_constructor_union (tree type, tree init)
After the execution, the initializer will have TREE_CONSTANT if all elts are After the execution, the initializer will have TREE_CONSTANT if all elts are
constant, and TREE_STATIC set if, in addition, all elts are simple enough constant, and TREE_STATIC set if, in addition, all elts are simple enough
constants that the assembler and linker can compute them. constants that the assembler and linker can compute them.
The function returns the initializer itself, or error_mark_node in case The function returns the initializer itself, or error_mark_node in case
of error. */ of error. */
......
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