Commit dc478a5d by Kazu Hirata Committed by Jeff Law

* tree.c: Fix formatting.

From-SVN: r36036
parent abf9af02
2000-08-28 Kazu Hirata <kazu@hxi.com>
* tree.c: Fix formatting.
* xcoffout.c: Fix formatting.
2000-08-28 Jason Merrill <jason@redhat.com>
......
......@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file contains the low level primitives for operating on tree nodes,
including allocation, list operations, interning of identifiers,
construction of data type nodes and statement nodes,
......@@ -211,8 +210,8 @@ typedef enum
all_kinds
} tree_node_kind;
int tree_node_counts[(int)all_kinds];
int tree_node_sizes[(int)all_kinds];
int tree_node_counts[(int) all_kinds];
int tree_node_sizes[(int) all_kinds];
int id_string_size = 0;
static const char * const tree_node_kind_names[] = {
......@@ -1047,8 +1046,8 @@ make_node (code)
memset ((PTR) t, 0, length);
#ifdef GATHER_STATISTICS
tree_node_counts[(int)kind]++;
tree_node_sizes[(int)kind] += length;
tree_node_counts[(int) kind]++;
tree_node_sizes[(int) kind] += length;
#endif
TREE_SET_CODE (t, code);
......@@ -1279,14 +1278,15 @@ get_identifier (text)
hi &= (1 << HASHBITS) - 1;
hi %= MAX_HASH_TABLE;
/* Search table for identifier */
/* Search table for identifier. */
for (idp = hash_table[hi]; idp; idp = TREE_CHAIN (idp))
if (IDENTIFIER_LENGTH (idp) == len
&& IDENTIFIER_POINTER (idp)[0] == text[0]
&& !bcmp (IDENTIFIER_POINTER (idp), text, len))
return idp; /* <-- return if found */
/* Return if found. */
return idp;
/* Not found; optionally warn about a similar identifier */
/* Not found; optionally warn about a similar identifier. */
if (warn_id_clash && do_identifier_warnings && len >= id_clash_len)
for (idp = hash_table[hi]; idp; idp = TREE_CHAIN (idp))
if (!strncmp (IDENTIFIER_POINTER (idp), text, id_clash_len))
......@@ -1345,7 +1345,7 @@ maybe_get_identifier (text)
hi &= (1 << HASHBITS) - 1;
hi %= MAX_HASH_TABLE;
/* Search table for identifier */
/* Search table for identifier. */
for (idp = hash_table[hi]; idp; idp = TREE_CHAIN (idp))
if (IDENTIFIER_LENGTH (idp) == len
&& IDENTIFIER_POINTER (idp)[0] == text[0]
......@@ -1448,11 +1448,11 @@ real_value_from_int_cst (type, i)
{
REAL_VALUE_TYPE e;
d = (double) (~ TREE_INT_CST_HIGH (i));
d = (double) (~TREE_INT_CST_HIGH (i));
e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
* (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
d *= e;
e = (double) (~ TREE_INT_CST_LOW (i));
e = (double) (~TREE_INT_CST_LOW (i));
d += e;
d = (- d - 1.0);
}
......@@ -1476,7 +1476,7 @@ real_value_from_int_cst (type, i)
struct brfic_args
{
tree type; /* Input: type to conver to. */
tree i; /* Input: operand to convert */
tree i; /* Input: operand to convert. */
REAL_VALUE_TYPE d; /* Output: floating point value. */
};
......@@ -1675,7 +1675,7 @@ integer_all_onesp (expr)
uns = TREE_UNSIGNED (TREE_TYPE (expr));
if (!uns)
return (TREE_INT_CST_LOW (expr) == ~ (unsigned HOST_WIDE_INT) 0
return (TREE_INT_CST_LOW (expr) == ~(unsigned HOST_WIDE_INT) 0
&& TREE_INT_CST_HIGH (expr) == -1);
/* Note that using TYPE_PRECISION here is wrong. We care about the
......@@ -1698,7 +1698,7 @@ integer_all_onesp (expr)
else
high_value = ((HOST_WIDE_INT) 1 << shift_amount) - 1;
return (TREE_INT_CST_LOW (expr) == ~ (unsigned HOST_WIDE_INT) 0
return (TREE_INT_CST_LOW (expr) == ~(unsigned HOST_WIDE_INT) 0
&& TREE_INT_CST_HIGH (expr) == high_value);
}
else
......@@ -2050,7 +2050,8 @@ chainon (op1, op2)
#endif
return op1;
}
else return op2;
else
return op2;
}
/* Return the last node in a chain of nodes (chained through TREE_CHAIN). */
......@@ -3168,7 +3169,6 @@ stabilize_reference (ref)
ref)));
break;
/* If arg isn't a kind of lvalue we recognize, make no change.
Caller should recognize the error for an invalid lvalue. */
default:
......@@ -3388,8 +3388,8 @@ build1 (code, type, node)
memset ((PTR) t, 0, sizeof (struct tree_common));
#ifdef GATHER_STATISTICS
tree_node_counts[(int)kind]++;
tree_node_sizes[(int)kind] += length;
tree_node_counts[(int) kind]++;
tree_node_sizes[(int) kind] += length;
#endif
TREE_SET_CODE (t, code);
......@@ -3700,7 +3700,8 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
#ifdef VALID_MACHINE_TYPE_ATTRIBUTE
if (validated)
/* Don't apply the attribute to both the decl and the type. */;
/* Don't apply the attribute to both the decl and the type. */
;
else if (VALID_MACHINE_TYPE_ATTRIBUTE (type, type_attr_list, attr_name,
attr_args))
{
......@@ -4037,7 +4038,7 @@ static unsigned int
type_hash_hash (item)
const void *item;
{
return ((const struct type_hash*)item)->hash;
return ((const struct type_hash *) item)->hash;
}
/* Look in the type hash table for a type isomorphic to TYPE.
......@@ -4078,7 +4079,7 @@ type_hash_add (hashcode, type)
h->hash = hashcode;
h->type = type;
loc = htab_find_slot_with_hash (type_hash_table, h, hashcode, INSERT);
*(struct type_hash**) loc = h;
*(struct type_hash **) loc = h;
}
/* Given TYPE, and HASHCODE its hash code, return the canonical
......@@ -4132,7 +4133,7 @@ mark_hash_entry (entry, param)
void **entry;
void *param ATTRIBUTE_UNUSED;
{
struct type_hash *p = *(struct type_hash **)entry;
struct type_hash *p = *(struct type_hash **) entry;
ggc_mark_tree (p->type);
......@@ -4341,7 +4342,7 @@ tree_int_cst_msb (t)
rshift_double (TREE_INT_CST_LOW (t), TREE_INT_CST_HIGH (t), prec,
2 * HOST_BITS_PER_WIDE_INT, &l, &h, 0);
return (l & 1) == 1;
}
}
/* Return an indication of the sign of the integer constant T.
The return value is -1 if T < 0, 0 if T == 0, and 1 if T > 0.
......@@ -5394,15 +5395,15 @@ clean_symbol_name (p)
char *p;
{
for (; *p; p++)
if (! ( ISDIGIT(*p)
if (! (ISDIGIT(*p)
#ifndef NO_DOLLAR_IN_LABEL /* this for `$'; unlikely, but... -- kr */
|| *p == '$'
#endif
#ifndef NO_DOT_IN_LABEL /* this for `.'; unlikely, but... */
|| *p == '.'
#endif
|| ISUPPER(*p)
|| ISLOWER(*p)))
|| ISUPPER (*p)
|| ISLOWER (*p)))
*p = '_';
}
......@@ -5511,7 +5512,7 @@ get_set_constructor_bits (init, buffer, bit_size)
if (lo_index < 0 || lo_index >= bit_size
|| hi_index < 0 || hi_index >= bit_size)
abort ();
for ( ; lo_index <= hi_index; lo_index++)
for (; lo_index <= hi_index; lo_index++)
buffer[lo_index] = 1;
}
else
......@@ -5546,7 +5547,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
int bit_size = wd_size * set_word_size;
int bit_pos = 0;
unsigned char *bytep = buffer;
char *bit_buffer = (char *) alloca(bit_size);
char *bit_buffer = (char *) alloca (bit_size);
tree non_const_bits = get_set_constructor_bits (init, bit_buffer, bit_size);
for (i = 0; i < wd_size; i++)
......@@ -5571,6 +5572,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that the tree code of NODE does not match the expected CODE.
FILE, LINE, and FUNCTION are of the caller. */
void
tree_check_failed (node, code, file, line, function)
const tree node;
......@@ -5586,6 +5588,7 @@ tree_check_failed (node, code, file, line, function)
/* Similar to above, except that we check for a class of tree
code, given in CL. */
void
tree_class_check_failed (node, cl, file, line, function)
const tree node;
......@@ -5602,9 +5605,9 @@ tree_class_check_failed (node, cl, file, line, function)
#endif /* ENABLE_TREE_CHECKING */
/* For a new vector type node T, build the information necessary for
debuggint output. */
static void
finish_vector_type (t)
tree t;
......@@ -5776,7 +5779,7 @@ build_common_tree_nodes_2 (short_double)
layout_type (complex_long_double_type_node);
#ifdef BUILD_VA_LIST_TYPE
BUILD_VA_LIST_TYPE(va_list_type_node);
BUILD_VA_LIST_TYPE (va_list_type_node);
#else
va_list_type_node = ptr_type_node;
#endif
......
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