+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
/* 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).
/* 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);
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);
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))))
< 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);
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);
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));
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))
{
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);
}
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);
}
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;
{
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);
}
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)
*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;
}
*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;
}
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);
{
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)
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;
/* 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);
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
= 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
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);
__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);
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 ();
}
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;
}
}
- 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))
/* 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
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;
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
{
/* 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));
}
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));
/* 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);
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;
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);
}
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]))))
{
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);
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));
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);
}
&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))
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
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;
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;
}
{
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);
}
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;
/* 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;
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,
{
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,
/* 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? */
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;
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)
{
/* 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);
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);
/* 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);
}