91th Cygnus<->FSF quick merge

From-SVN: r14021
This commit is contained in:
Jason Merrill 1997-05-06 20:14:14 +00:00 committed by Mike Stump
parent 065bbfe6bf
commit beb53fb84a
15 changed files with 181 additions and 172 deletions

View File

@ -1,3 +1,7 @@
Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (build_new_op): Handle null arg2 for ?:.
Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
* except.c (expand_exception_blocks): Ensure that we flow through

View File

@ -1,5 +1,5 @@
/* Functions related to invoking methods and overloaded functions.
Copyright (C) 1987, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1987, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) and
hacked by Brendan Kehoe (brendan@cygnus.com).
@ -1896,10 +1896,10 @@ build_method_call (instance, name, parms, basetype_path, flags)
/* The MAIN_VARIANT of the type that `instance_ptr' winds up being. */
tree inst_ptr_basetype;
static_call_context =
(TREE_CODE (instance) == INDIRECT_REF
&& TREE_CODE (TREE_OPERAND (instance, 0)) == NOP_EXPR
&& TREE_OPERAND (TREE_OPERAND (instance, 0), 0) == error_mark_node);
static_call_context
= (TREE_CODE (instance) == INDIRECT_REF
&& TREE_CODE (TREE_OPERAND (instance, 0)) == NOP_EXPR
&& TREE_OPERAND (TREE_OPERAND (instance, 0), 0) == error_mark_node);
if (TREE_CODE (instance) == OFFSET_REF)
instance = resolve_offset_ref (instance);
@ -1997,8 +1997,9 @@ build_method_call (instance, name, parms, basetype_path, flags)
if (basetype_path == NULL_TREE
&& IS_SIGNATURE (basetype))
basetype_path = TYPE_BINFO (basetype);
else if (basetype_path == NULL_TREE ||
BINFO_TYPE (basetype_path) != TYPE_MAIN_VARIANT (inst_ptr_basetype))
else if (basetype_path == NULL_TREE
|| (BINFO_TYPE (basetype_path)
!= TYPE_MAIN_VARIANT (inst_ptr_basetype)))
basetype_path = TYPE_BINFO (inst_ptr_basetype);
result = build_field_call (basetype_path, instance_ptr, name, parms);
@ -4607,7 +4608,8 @@ build_new_op (code, flags, arg1, arg2, arg3)
if (code == COND_EXPR)
{
if (TREE_CODE (TREE_TYPE (arg2)) == VOID_TYPE
if (arg2 == NULL_TREE
|| TREE_CODE (TREE_TYPE (arg2)) == VOID_TYPE
|| TREE_CODE (TREE_TYPE (arg3)) == VOID_TYPE
|| (! IS_OVERLOAD_TYPE (TREE_TYPE (arg2))
&& ! IS_OVERLOAD_TYPE (TREE_TYPE (arg3))))
@ -5046,8 +5048,8 @@ build_over_call (fn, convs, args, flags)
< TYPE_VOLATILE (TREE_TYPE (argtype)));
int dc = (TYPE_READONLY (TREE_TYPE (parmtype))
< TYPE_READONLY (TREE_TYPE (argtype)));
char *p = (dv && dc ? "const and volatile" :
dc ? "const" : dv ? "volatile" : "");
char *p = (dv && dc ? "const and volatile"
: dc ? "const" : dv ? "volatile" : "");
cp_pedwarn ("passing `%T' as `this' argument of `%#D' discards %s",
TREE_TYPE (argtype), fn, p);
@ -5310,8 +5312,8 @@ build_new_method_call (instance, name, args, basetype_path, flags)
TREE_TYPE (instance_ptr) = build_pointer_type (basetype);
}
pretty_name =
(name == ctor_identifier ? constructor_name_full (basetype) : name);
pretty_name
= (name == ctor_identifier ? constructor_name_full (basetype) : name);
fns = lookup_fnfields (basetype_path, name, 1);

View File

@ -2144,8 +2144,8 @@ finish_vtbls (binfo, do_self, t)
for (i = 0; i < n_baselinks; i++)
{
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
if (TREE_VIA_VIRTUAL (base_binfo))
{
base_binfo = binfo_member (BINFO_TYPE (base_binfo), CLASSTYPE_VBASECLASSES (t));
@ -2162,11 +2162,11 @@ overrides (fndecl, base_fndecl)
tree fndecl, base_fndecl;
{
/* Destructors have special names. */
if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (base_fndecl)) &&
DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl)))
if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (base_fndecl))
&& DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl)))
return 1;
if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (base_fndecl)) ||
DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl)))
if (DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (base_fndecl))
|| DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (fndecl)))
return 0;
if (DECL_NAME (fndecl) == DECL_NAME (base_fndecl))
{
@ -2397,8 +2397,8 @@ modify_all_direct_vtables (binfo, do_self, t, fndecl, pfn)
for (i = 0; i < n_baselinks; i++)
{
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
if (! TREE_VIA_VIRTUAL (base_binfo))
modify_all_direct_vtables (base_binfo, is_not_base_vtable, t, fndecl, pfn);
}
@ -2493,8 +2493,8 @@ fixup_vtable_deltas (binfo, init_self, t)
for (i = 0; i < n_baselinks; i++)
{
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
if (! TREE_VIA_VIRTUAL (base_binfo))
fixup_vtable_deltas (base_binfo, is_not_base_vtable, t);
}
@ -2525,8 +2525,8 @@ modify_all_indirect_vtables (binfo, do_self, via_virtual, t, fndecl, pfn)
for (i = 0; i < n_baselinks; i++)
{
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
if (TREE_VIA_VIRTUAL (base_binfo))
{
via_virtual = 1;
@ -2705,8 +2705,8 @@ merge_overrides (binfo, old, do_self, t)
{
tree base_binfo = TREE_VEC_ELT (binfos, i);
tree old_base_binfo = TREE_VEC_ELT (old_binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
if (! TREE_VIA_VIRTUAL (base_binfo))
merge_overrides (base_binfo, old_base_binfo, is_not_base_vtable, t);
}
@ -3221,8 +3221,9 @@ finish_struct_1 (t, warn_anon)
tree ctype = DECL_INITIAL (x);
tree sname = DECL_NAME (x);
tree access
= TREE_PRIVATE (x) ? access_private_node :
TREE_PROTECTED (x) ? access_protected_node : access_public_node;
= TREE_PRIVATE (x) ? access_private_node
: TREE_PROTECTED (x) ? access_protected_node
: access_public_node;
tree fdecl, binfo;
if (last_x)
@ -4606,9 +4607,9 @@ pushclass (type, modify)
*current_class_stack++ = current_class_type;
if (current_class_stack >= current_class_base + current_class_stacksize)
{
current_class_base =
(tree *)xrealloc (current_class_base,
sizeof (tree) * (current_class_stacksize + 10));
current_class_base
= (tree *)xrealloc (current_class_base,
sizeof (tree) * (current_class_stacksize + 10));
current_class_stack = current_class_base + current_class_stacksize;
current_class_stacksize += 10;
}
@ -4790,9 +4791,9 @@ push_lang_context (name)
*current_lang_stack++ = current_lang_name;
if (current_lang_stack >= current_lang_base + current_lang_stacksize)
{
current_lang_base =
(tree *)xrealloc (current_lang_base,
sizeof (tree) * (current_lang_stacksize + 10));
current_lang_base
= (tree *)xrealloc (current_lang_base,
sizeof (tree) * (current_lang_stacksize + 10));
current_lang_stack = current_lang_base + current_lang_stacksize;
current_lang_stacksize += 10;
}
@ -5257,8 +5258,8 @@ instantiate_type (lhstype, rhs, complain)
TREE_TYPE (rhs) = lhstype;
TREE_OPERAND (rhs, 0) = fn;
TREE_CONSTANT (rhs) = staticp (fn);
if (TREE_CODE (lhstype) == POINTER_TYPE &&
TREE_CODE (TREE_TYPE (lhstype)) == METHOD_TYPE)
if (TREE_CODE (lhstype) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (lhstype)) == METHOD_TYPE)
{
build_ptrmemfunc_type (lhstype);
rhs = build_ptrmemfunc (lhstype, rhs, 0);

View File

@ -707,8 +707,8 @@ convert_to_aggr (type, expr, msgp, protect)
{
int saw_private = 0;
int saw_protected = 0;
struct candidate *candidates =
(struct candidate *) alloca ((decl_list_length (fndecl)+1) * sizeof (struct candidate));
struct candidate *candidates
= (struct candidate *) alloca ((decl_list_length (fndecl)+1) * sizeof (struct candidate));
struct candidate *cp = candidates;
while (fndecl)

View File

@ -1820,8 +1820,8 @@ maybe_push_to_top_level (pseudo)
int pseudo;
{
extern int current_lang_stacksize;
struct saved_scope *s =
(struct saved_scope *) xmalloc (sizeof (struct saved_scope));
struct saved_scope *s
= (struct saved_scope *) xmalloc (sizeof (struct saved_scope));
struct binding_level *b = inner_binding_level;
tree old_bindings = NULL_TREE;
@ -4707,10 +4707,10 @@ init_decl_processing ()
/* Define `char', which is like either `signed char' or `unsigned char'
but not the same as either. */
char_type_node =
(flag_signed_char
? make_signed_type (CHAR_TYPE_SIZE)
: make_unsigned_type (CHAR_TYPE_SIZE));
char_type_node
= (flag_signed_char
? make_signed_type (CHAR_TYPE_SIZE)
: make_unsigned_type (CHAR_TYPE_SIZE));
record_builtin_type (RID_CHAR, "char", char_type_node);
long_integer_type_node = make_signed_type (LONG_TYPE_SIZE);
@ -4843,8 +4843,8 @@ init_decl_processing ()
TREE_TYPE (void_zero_node) = void_type_node;
string_type_node = build_pointer_type (char_type_node);
const_string_type_node =
build_pointer_type (build_type_variant (char_type_node, 1, 0));
const_string_type_node
= build_pointer_type (build_type_variant (char_type_node, 1, 0));
#if 0
record_builtin_type (RID_MAX, NULL_PTR, string_type_node);
#endif
@ -4873,8 +4873,8 @@ init_decl_processing ()
= build_function_type (integer_type_node, NULL_TREE);
ptr_type_node = build_pointer_type (void_type_node);
const_ptr_type_node =
build_pointer_type (build_type_variant (void_type_node, 1, 0));
const_ptr_type_node
= build_pointer_type (build_type_variant (void_type_node, 1, 0));
#if 0
record_builtin_type (RID_MAX, NULL_PTR, ptr_type_node);
#endif
@ -4964,9 +4964,9 @@ init_decl_processing ()
builtin_function ("__builtin_constant_p", int_ftype_int,
BUILT_IN_CONSTANT_P, NULL_PTR);
builtin_return_address_fndecl =
builtin_function ("__builtin_return_address", ptr_ftype_unsigned,
BUILT_IN_RETURN_ADDRESS, NULL_PTR);
builtin_return_address_fndecl
= builtin_function ("__builtin_return_address", ptr_ftype_unsigned,
BUILT_IN_RETURN_ADDRESS, NULL_PTR);
builtin_function ("__builtin_frame_address", ptr_ftype_unsigned,
BUILT_IN_FRAME_ADDRESS, NULL_PTR);
@ -5278,12 +5278,15 @@ init_decl_processing ()
__t_desc_type_node = make_lang_type (RECORD_TYPE);
__i_desc_type_node = make_lang_type (RECORD_TYPE);
__m_desc_type_node = make_lang_type (RECORD_TYPE);
__t_desc_array_type =
build_array_type (build_pointer_type (__t_desc_type_node), NULL_TREE);
__i_desc_array_type =
build_array_type (build_pointer_type (__i_desc_type_node), NULL_TREE);
__m_desc_array_type =
build_array_type (build_pointer_type (__m_desc_type_node), NULL_TREE);
__t_desc_array_type
= build_array_type (build_pointer_type (__t_desc_type_node),
NULL_TREE);
__i_desc_array_type
= build_array_type (build_pointer_type (__i_desc_type_node),
NULL_TREE);
__m_desc_array_type
= build_array_type (build_pointer_type (__m_desc_type_node),
NULL_TREE);
fields[0] = build_lang_field_decl (FIELD_DECL, get_identifier ("name"),
string_type_node);
@ -6816,11 +6819,11 @@ expand_static_init (decl, init)
pfvlist = tree_cons (NULL_TREE, PFV, void_list_node);
push_lang_context (lang_name_c);
atexit_fndecl =
builtin_function ("atexit",
build_function_type (void_type_node,
pfvlist),
NOT_BUILT_IN, NULL_PTR);
atexit_fndecl
= builtin_function ("atexit",
build_function_type (void_type_node,
pfvlist),
NOT_BUILT_IN, NULL_PTR);
assemble_external (atexit_fndecl);
Atexit = default_conversion (atexit_fndecl);
pop_lang_context ();
@ -7845,8 +7848,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
}
else if (RIDBIT_SETP (RID_TYPEDEF, specbits))
pedwarn ("ANSI C++ forbids typedef which does not specify a type");
else if (declspecs == NULL_TREE &&
(innermost_code != CALL_EXPR || pedantic))
else if (declspecs == NULL_TREE
&& (innermost_code != CALL_EXPR || pedantic))
cp_pedwarn ("ANSI C++ forbids declaration `%D' with no type or storage class",
dname);
type = integer_type_node;
@ -8342,11 +8345,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
}
}
itype =
fold (build_binary_op (MINUS_EXPR,
convert (index_type, size),
convert (index_type,
integer_one_node), 1));
itype
= fold (build_binary_op (MINUS_EXPR,
convert (index_type, size),
convert (index_type,
integer_one_node), 1));
if (! TREE_CONSTANT (itype))
itype = variable_size (itype);
else if (TREE_OVERFLOW (itype))
@ -8437,9 +8440,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
/* Say it's a definition only for the CALL_EXPR
closest to the identifier. */
funcdecl_p =
inner_decl && (TREE_CODE (inner_decl) == IDENTIFIER_NODE
|| TREE_CODE (inner_decl) == BIT_NOT_EXPR);
funcdecl_p
= inner_decl && (TREE_CODE (inner_decl) == IDENTIFIER_NODE
|| TREE_CODE (inner_decl) == BIT_NOT_EXPR);
if (ctype == NULL_TREE
&& decl_context == FIELD
@ -8503,8 +8506,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
error ("return value type specifier for constructor ignored");
}
type = build_pointer_type (ctype);
if (decl_context == FIELD &&
IS_SIGNATURE (current_class_type))
if (decl_context == FIELD
&& IS_SIGNATURE (current_class_type))
{
error ("constructor not allowed in signature");
return void_type_node;
@ -8819,12 +8822,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
else if (uses_template_parms (ctype))
{
if (TREE_CODE (type) == FUNCTION_TYPE)
type =
build_cplus_method_type (build_type_variant (ctype,
constp,
volatilep),
TREE_TYPE (type),
TYPE_ARG_TYPES (type));
type
= build_cplus_method_type (build_type_variant (ctype,
constp,
volatilep),
TREE_TYPE (type),
TYPE_ARG_TYPES (type));
}
else
{
@ -9982,10 +9985,10 @@ grok_op_properties (decl, virtualp, friendp)
/* Take care of function decl if we had syntax errors. */
if (argtypes == NULL_TREE)
TREE_TYPE (decl) =
build_function_type (ptr_type_node,
hash_tree_chain (integer_type_node,
void_list_node));
TREE_TYPE (decl)
= build_function_type (ptr_type_node,
hash_tree_chain (integer_type_node,
void_list_node));
else
TREE_TYPE (decl) = coerce_new_type (TREE_TYPE (decl));
}
@ -9996,10 +9999,10 @@ grok_op_properties (decl, virtualp, friendp)
revert_static_member_fn (&decl, NULL, NULL);
if (argtypes == NULL_TREE)
TREE_TYPE (decl) =
build_function_type (void_type_node,
hash_tree_chain (ptr_type_node,
void_list_node));
TREE_TYPE (decl)
= build_function_type (void_type_node,
hash_tree_chain (ptr_type_node,
void_list_node));
else
{
TREE_TYPE (decl) = coerce_delete_type (TREE_TYPE (decl));
@ -11673,16 +11676,15 @@ finish_function (lineno, call_poplevel, nested)
/* At the end, call delete if that's what's requested. */
if (TYPE_GETS_REG_DELETE (current_class_type))
/* This NOP_EXPR means we are in a static call context. */
exprstmt =
build_method_call
(build_indirect_ref
(build1 (NOP_EXPR, build_pointer_type (current_class_type),
error_mark_node),
NULL_PTR),
ansi_opname[(int) DELETE_EXPR],
tree_cons (NULL_TREE, current_class_ptr,
build_tree_list (NULL_TREE, virtual_size)),
NULL_TREE, LOOKUP_NORMAL);
exprstmt
= build_method_call (build_indirect_ref (build1 (NOP_EXPR,
build_pointer_type (current_class_type),
error_mark_node),
NULL_PTR),
ansi_opname[(int) DELETE_EXPR],
tree_cons (NULL_TREE, current_class_ptr,
build_tree_list (NULL_TREE, virtual_size)),
NULL_TREE, LOOKUP_NORMAL);
else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
exprstmt = build_x_delete (ptr_type_node, current_class_ptr, 0,
virtual_size);

View File

@ -265,32 +265,32 @@ init_exception_processing ()
push_lang_context (lang_name_c);
catch_match_fndecl =
builtin_function (flag_rtti
? "__throw_type_match_rtti"
: "__throw_type_match",
build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
void_list_node)))),
NOT_BUILT_IN, NULL_PTR);
find_first_exception_match_fndecl =
builtin_function ("__find_first_exception_table_match",
build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
void_list_node)),
NOT_BUILT_IN, NULL_PTR);
unwind_fndecl =
builtin_function ("__unwind_function",
build_function_type (void_type_node,
tree_cons (NULL_TREE, ptr_type_node,
void_list_node)),
NOT_BUILT_IN, NULL_PTR);
empty_fndecl =
builtin_function ("__empty",
build_function_type (void_type_node, void_list_node),
NOT_BUILT_IN, NULL_PTR);
catch_match_fndecl
= builtin_function (flag_rtti
? "__throw_type_match_rtti"
: "__throw_type_match",
build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
void_list_node)))),
NOT_BUILT_IN, NULL_PTR);
find_first_exception_match_fndecl
= builtin_function ("__find_first_exception_table_match",
build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
void_list_node)),
NOT_BUILT_IN, NULL_PTR);
unwind_fndecl
= builtin_function ("__unwind_function",
build_function_type (void_type_node,
tree_cons (NULL_TREE, ptr_type_node,
void_list_node)),
NOT_BUILT_IN, NULL_PTR);
empty_fndecl
= builtin_function ("__empty",
build_function_type (void_type_node, void_list_node),
NOT_BUILT_IN, NULL_PTR);
DECL_EXTERNAL (empty_fndecl) = 1;
TREE_PUBLIC (empty_fndecl) = 1;

View File

@ -328,8 +328,8 @@ extract_scalar_init (decl, init)
to = XEXP (r, 0);
if (! (to == value ||
(GET_CODE (to) == SUBREG && XEXP (to, 0) == value)))
if (! (to == value
|| (GET_CODE (to) == SUBREG && XEXP (to, 0) == value)))
return 0;
r = XEXP (r, 1);

View File

@ -202,10 +202,10 @@ add_friends (type, name, friend_type)
}
list = TREE_CHAIN (list);
}
DECL_FRIENDLIST (typedecl) =
tree_cons (name,
build_tree_list (friend_type, NULL_TREE),
DECL_FRIENDLIST (typedecl));
DECL_FRIENDLIST (typedecl)
= tree_cons (name,
build_tree_list (friend_type, NULL_TREE),
DECL_FRIENDLIST (typedecl));
if (! strncmp (IDENTIFIER_POINTER (name),
IDENTIFIER_POINTER (ansi_opname[(int) MODIFY_EXPR]),
strlen (IDENTIFIER_POINTER (ansi_opname[(int) MODIFY_EXPR]))))

View File

@ -123,8 +123,8 @@ expand_direct_vtbls_init (real_binfo, binfo, init_self, can_elide, addr)
{
tree real_base_binfo = TREE_VEC_ELT (real_binfos, i);
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (real_binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (real_binfo));
if (! TREE_VIA_VIRTUAL (real_base_binfo))
expand_direct_vtbls_init (real_base_binfo, base_binfo,
is_not_base_vtable, can_elide, addr);

View File

@ -1632,8 +1632,8 @@ hack_identifier (value, name)
if (TREE_CODE (value) == VAR_DECL)
error ("static member `%s' is %s",
IDENTIFIER_POINTER (name),
TREE_PRIVATE (value) ? "private" :
"from a private base class");
TREE_PRIVATE (value) ? "private"
: "from a private base class");
else
error ("enum `%s' is from private base class",
IDENTIFIER_POINTER (name));

View File

@ -1179,8 +1179,8 @@ instantiate_class_template (type)
TREE_VEC_LENGTH (args), NULL_TREE);
BINFO_INHERITANCE_CHAIN (elt) = binfo;
if (! uses_template_parms (type) &&
TYPE_SIZE (complete_type (TREE_TYPE (elt))) == NULL_TREE)
if (! uses_template_parms (type)
&& TYPE_SIZE (complete_type (TREE_TYPE (elt))) == NULL_TREE)
cp_error ("base class `%T' of `%T' has incomplete type",
TREE_TYPE (elt), type);
}
@ -1265,9 +1265,9 @@ instantiate_class_template (type)
&TREE_VEC_ELT (args, 0), TREE_VEC_LENGTH (args), NULL_TREE);
{
tree d = CLASSTYPE_FRIEND_CLASSES (type) =
tsubst (CLASSTYPE_FRIEND_CLASSES (pattern), &TREE_VEC_ELT (args, 0),
TREE_VEC_LENGTH (args), NULL_TREE);
tree d = CLASSTYPE_FRIEND_CLASSES (type)
= tsubst (CLASSTYPE_FRIEND_CLASSES (pattern), &TREE_VEC_ELT (args, 0),
TREE_VEC_LENGTH (args), NULL_TREE);
/* This does injection for friend classes. */
for (; d; d = TREE_CHAIN (d))
@ -1600,8 +1600,8 @@ tsubst (t, args, nargs, in_decl)
else
SET_DECL_IMPLICIT_INSTANTIATION (r);
DECL_TEMPLATE_INSTANTIATIONS (tmpl) =
tree_cons (argvec, r, DECL_TEMPLATE_INSTANTIATIONS (tmpl));
DECL_TEMPLATE_INSTANTIATIONS (tmpl)
= tree_cons (argvec, r, DECL_TEMPLATE_INSTANTIATIONS (tmpl));
}
/* Like grokfndecl. If we don't do this, pushdecl will mess up our

View File

@ -441,8 +441,8 @@ build_dynamic_cast (type, expr)
goto fail;
if (TYPE_SIZE (TREE_TYPE (exprtype)) == NULL_TREE)
goto fail;
if (TREE_READONLY (TREE_TYPE (exprtype)) &&
! TYPE_READONLY (TREE_TYPE (type)))
if (TREE_READONLY (TREE_TYPE (exprtype))
&& ! TYPE_READONLY (TREE_TYPE (type)))
goto fail;
if (TYPE_MAIN_VARIANT (TREE_TYPE (type)) == void_type_node)
break;
@ -477,8 +477,8 @@ build_dynamic_cast (type, expr)
goto fail;
if (TYPE_SIZE (TREE_TYPE (exprtype)) == NULL_TREE)
goto fail;
if (TREE_READONLY (TREE_TYPE (exprtype)) &&
! TYPE_READONLY (TREE_TYPE (type)))
if (TREE_READONLY (TREE_TYPE (exprtype))
&& ! TYPE_READONLY (TREE_TYPE (type)))
goto fail;
}
@ -833,8 +833,8 @@ expand_class_desc (tdecl, type)
{
tree arrtype = build_array_type (base_info_type_node, NULL_TREE);
elts = build (CONSTRUCTOR, arrtype, NULL_TREE, elts);
TREE_HAS_CONSTRUCTOR (elts) = TREE_CONSTANT (elts) =
TREE_STATIC (elts) = 1;
TREE_HAS_CONSTRUCTOR (elts) = TREE_CONSTANT (elts)
= TREE_STATIC (elts) = 1;
complete_array_type (arrtype, elts, 1);
}

View File

@ -245,9 +245,9 @@ static struct memoized_entry *
my_new_memoized_entry (chain)
struct memoized_entry *chain;
{
struct memoized_entry *p =
(struct memoized_entry *)obstack_alloc (&type_obstack_entries,
sizeof (struct memoized_entry));
struct memoized_entry *p
= (struct memoized_entry *)obstack_alloc (&type_obstack_entries,
sizeof (struct memoized_entry));
bzero ((char *) p, sizeof (struct memoized_entry));
MEMOIZED_CHAIN (p) = chain;
MEMOIZED_UID (p) = ++my_memoized_entry_counter;
@ -854,9 +854,9 @@ compute_access (basetype_path, field)
/* Replaces static decl above. */
tree previous_scope;
#endif
int static_mem =
((TREE_CODE (field) == FUNCTION_DECL && DECL_STATIC_FUNCTION_P (field))
|| (TREE_CODE (field) != FUNCTION_DECL && TREE_STATIC (field)));
int static_mem
= ((TREE_CODE (field) == FUNCTION_DECL && DECL_STATIC_FUNCTION_P (field))
|| (TREE_CODE (field) != FUNCTION_DECL && TREE_STATIC (field)));
if (! flag_access_control)
return access_public_node;
@ -2182,8 +2182,8 @@ get_abstract_virtuals_1 (binfo, do_self, abstract_virtuals)
for (i = 0; i < n_baselinks; i++)
{
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
if (! TREE_VIA_VIRTUAL (base_binfo))
abstract_virtuals
= get_abstract_virtuals_1 (base_binfo, is_not_base_vtable,
@ -2887,8 +2887,8 @@ fixup_virtual_upcast_offsets (real_binfo, binfo, init_self, can_elide, addr, ori
{
tree real_base_binfo = TREE_VEC_ELT (real_binfos, i);
tree base_binfo = TREE_VEC_ELT (binfos, i);
int is_not_base_vtable =
i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (real_binfo));
int is_not_base_vtable
= i != CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (real_binfo));
if (! TREE_VIA_VIRTUAL (real_base_binfo))
fixup_virtual_upcast_offsets (real_base_binfo, base_binfo,
is_not_base_vtable, can_elide, addr,

View File

@ -400,8 +400,8 @@ match_method_types (sig_mtype, class_mtype)
/* Compare the first argument `this.' */
{
/* Get the type of what the `optr' is pointing to. */
tree sig_this =
TREE_TYPE (TREE_TYPE (TYPE_FIELDS (TREE_VALUE (sig_arg_types))));
tree sig_this
= TREE_TYPE (TREE_TYPE (TYPE_FIELDS (TREE_VALUE (sig_arg_types))));
tree class_this = TREE_VALUE (class_arg_types);
if (TREE_CODE (class_this) == RECORD_TYPE) /* Is `this' a sig ptr? */
@ -790,9 +790,9 @@ build_signature_pointer_constructor (lhs, rhs)
if (! ((TREE_CODE (rhstype) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (rhstype)) == RECORD_TYPE)
|| (TYPE_LANG_SPECIFIC (rhstype) &&
(IS_SIGNATURE_POINTER (rhstype)
|| IS_SIGNATURE_REFERENCE (rhstype)))))
|| (TYPE_LANG_SPECIFIC (rhstype)
&& (IS_SIGNATURE_POINTER (rhstype)
|| IS_SIGNATURE_REFERENCE (rhstype)))))
{
error ("invalid assignment to signature pointer or reference");
return error_mark_node;
@ -814,8 +814,8 @@ build_signature_pointer_constructor (lhs, rhs)
saveable_obstack = &permanent_obstack;
}
if (TYPE_LANG_SPECIFIC (rhstype) &&
(IS_SIGNATURE_POINTER (rhstype) || IS_SIGNATURE_REFERENCE (rhstype)))
if (TYPE_LANG_SPECIFIC (rhstype)
&& (IS_SIGNATURE_POINTER (rhstype) || IS_SIGNATURE_REFERENCE (rhstype)))
{
if (SIGNATURE_TYPE (rhstype) == sig_ty)
{
@ -968,10 +968,10 @@ build_signature_method_call (function, parms)
/* Cast the signature method to have `this' of a normal pointer type. */
tree old_this = TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (TREE_TYPE (pfn))));
TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (TREE_TYPE (pfn)))) =
build_type_variant (build_pointer_type (basetype),
TYPE_READONLY (old_this),
TYPE_VOLATILE (old_this));
TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (TREE_TYPE (pfn))))
= build_type_variant (build_pointer_type (basetype),
TYPE_READONLY (old_this),
TYPE_VOLATILE (old_this));
direct_call = build_function_call (pfn, new_parms);

View File

@ -4397,8 +4397,8 @@ build_unary_op (code, xarg, noconvert)
if (staticp (arg))
TREE_CONSTANT (addr) = 1;
if (TREE_CODE (argtype) == POINTER_TYPE &&
TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE)
if (TREE_CODE (argtype) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE)
{
build_ptrmemfunc_type (argtype);
addr = build_ptrmemfunc (argtype, addr, 0);
@ -5575,8 +5575,8 @@ build_modify_expr (lhs, modifycode, rhs)
/* Handle assignment to signature pointers/refs. */
if (TYPE_LANG_SPECIFIC (lhstype) &&
(IS_SIGNATURE_POINTER (lhstype) || IS_SIGNATURE_REFERENCE (lhstype)))
if (TYPE_LANG_SPECIFIC (lhstype)
&& (IS_SIGNATURE_POINTER (lhstype) || IS_SIGNATURE_REFERENCE (lhstype)))
{
return build_signature_pointer_constructor (lhs, rhs);
}