This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix formatting.
- From: Kazu Hirata <kazu at hxi dot com>
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] Fix formatting.
Hi,
Attached is a patch to fix formatting of several source files.
Committed as obvious.
Kazu Hirata
2002-01-03 Kazu Hirata <kazu@hxi.com>
* c-common.c: Fix formatting.
* diagnostic.c: Likewise.
* doloop.c: Likewise.
* dwarf2out.c: Likewise.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.284
diff -u -r1.284 c-common.c
--- c-common.c 2002/01/02 02:31:57 1.284
+++ c-common.c 2002/01/04 01:56:30
@@ -281,12 +281,12 @@
if (if_stack_space == 0)
{
if_stack_space = 10;
- if_stack = (if_elt *)xmalloc (10 * sizeof (if_elt));
+ if_stack = (if_elt *) xmalloc (10 * sizeof (if_elt));
}
else if (if_stack_space == if_stack_pointer)
{
if_stack_space += 10;
- if_stack = (if_elt *)xrealloc (if_stack, if_stack_space * sizeof (if_elt));
+ if_stack = (if_elt *) xrealloc (if_stack, if_stack_space * sizeof (if_elt));
}
if_stmt = build_stmt (IF_STMT, NULL_TREE, NULL_TREE, NULL_TREE);
@@ -2298,7 +2298,7 @@
t = size_one_node;
}
else if (TREE_CODE (expr) == COMPONENT_REF
- && TREE_CODE (TREE_OPERAND (expr, 1)) == FIELD_DECL)
+ && TREE_CODE (TREE_OPERAND (expr, 1)) == FIELD_DECL)
t = size_int (DECL_ALIGN (TREE_OPERAND (expr, 1)) / BITS_PER_UNIT);
else if (TREE_CODE (expr) == INDIRECT_REF)
@@ -2308,7 +2308,7 @@
int bestalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t)));
while (TREE_CODE (t) == NOP_EXPR
- && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE)
+ && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE)
{
int thisalign;
@@ -2372,7 +2372,7 @@
typedef enum builtin_type builtin_type;
- tree builtin_types[(int)BT_LAST];
+ tree builtin_types[(int) BT_LAST];
int wchar_type_size;
tree array_domain_type;
/* Either char* or void*. */
@@ -3457,7 +3457,7 @@
== BUILT_IN_FRONTEND))
return c_expand_builtin (exp, target, tmode, modifier);
else
- abort();
+ abort ();
}
break;
@@ -3572,13 +3572,13 @@
{
memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
c_tree_code_type,
- (int)LAST_C_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
+ (int) LAST_C_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE);
memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
c_tree_code_length,
- (LAST_C_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
+ (LAST_C_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
c_tree_code_name,
- (LAST_C_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
+ (LAST_C_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
lang_unsafe_for_reeval = c_unsafe_for_reeval;
}
@@ -3610,28 +3610,28 @@
{
case BUILT_IN_PRINTF:
target = c_expand_builtin_printf (arglist, target, tmode,
- modifier, ignore,/*unlocked=*/ 0);
+ modifier, ignore, /*unlocked=*/ 0);
if (target)
return target;
break;
case BUILT_IN_PRINTF_UNLOCKED:
target = c_expand_builtin_printf (arglist, target, tmode,
- modifier, ignore,/*unlocked=*/ 1);
+ modifier, ignore, /*unlocked=*/ 1);
if (target)
return target;
break;
case BUILT_IN_FPRINTF:
target = c_expand_builtin_fprintf (arglist, target, tmode,
- modifier, ignore,/*unlocked=*/ 0);
+ modifier, ignore, /*unlocked=*/ 0);
if (target)
return target;
break;
case BUILT_IN_FPRINTF_UNLOCKED:
target = c_expand_builtin_fprintf (arglist, target, tmode,
- modifier, ignore,/*unlocked=*/ 1);
+ modifier, ignore, /*unlocked=*/ 1);
if (target)
return target;
break;
@@ -3651,7 +3651,7 @@
following it. */
static int
is_valid_printf_arglist (arglist)
- tree arglist;
+ tree arglist;
{
/* Save this value so we can restore it later. */
const int SAVE_pedantic = pedantic;
@@ -3738,7 +3738,7 @@
}
else
{
- /* We can't handle anything else with % args or %% ... yet. */
+ /* We can't handle anything else with % args or %% ... yet. */
if (strchr (TREE_STRING_POINTER (stripped_string), '%'))
return 0;
@@ -3851,7 +3851,7 @@
}
else
{
- /* We can't handle anything else with % args or %% ... yet. */
+ /* We can't handle anything else with % args or %% ... yet. */
if (strchr (TREE_STRING_POINTER (stripped_string), '%'))
return 0;
Index: diagnostic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/diagnostic.c,v
retrieving revision 1.72
diff -u -r1.72 diagnostic.c
--- diagnostic.c 2001/12/14 20:13:55 1.72
+++ diagnostic.c 2002/01/04 01:56:30
@@ -1,5 +1,5 @@
/* Language-independent diagnostic subroutines for the GNU C compiler
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC.
@@ -722,7 +722,7 @@
if (*++output_buffer_text_cursor (buffer) != '*')
abort ();
else if (*++output_buffer_text_cursor (buffer) != 's')
- abort();
+ abort ();
n = va_arg (output_buffer_format_args (buffer), int);
s = va_arg (output_buffer_format_args (buffer), const char *);
output_append (buffer, s, s + n);
@@ -912,7 +912,7 @@
output_buffer_ptr_to_format_args (diagnostic_buffer) = args_ptr;
output_buffer_text_cursor (diagnostic_buffer) = _(msgid);
format_with_decl (diagnostic_buffer, decl);
- diagnostic_finish ((output_buffer *)global_dc);
+ diagnostic_finish ((output_buffer *) global_dc);
output_destroy_prefix (diagnostic_buffer);
output_buffer_state (diagnostic_buffer) = os;
@@ -979,7 +979,7 @@
output_buffer_ptr_to_format_args (diagnostic_buffer) = ≈
output_buffer_text_cursor (diagnostic_buffer) = _(msgid);
output_format (diagnostic_buffer);
- diagnostic_finish ((output_buffer *)global_dc);
+ diagnostic_finish ((output_buffer *) global_dc);
output_buffer_state (diagnostic_buffer) = os;
VA_CLOSE (ap);
exit (FATAL_EXIT_CODE);
@@ -1058,7 +1058,7 @@
output_buffer_ptr_to_format_args (diagnostic_buffer) = ≈
output_buffer_text_cursor (diagnostic_buffer) = _(msgid);
output_format (diagnostic_buffer);
- diagnostic_finish ((output_buffer *)global_dc);
+ diagnostic_finish ((output_buffer *) global_dc);
output_buffer_state (diagnostic_buffer) = os;
VA_CLOSE (ap);
}
@@ -1096,25 +1096,25 @@
output_state os;
os = output_buffer_state (context);
- output_set_prefix ((output_buffer *)context, prefix);
+ output_set_prefix ((output_buffer *) context, prefix);
if (current_function_decl == NULL)
- output_add_string ((output_buffer *)context, _("At top level:"));
+ output_add_string ((output_buffer *) context, _("At top level:"));
else
{
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
output_printf
- ((output_buffer *)context, "In member function `%s':",
+ ((output_buffer *) context, "In member function `%s':",
(*decl_printable_name) (current_function_decl, 2));
else
output_printf
- ((output_buffer *)context, "In function `%s':",
+ ((output_buffer *) context, "In function `%s':",
(*decl_printable_name) (current_function_decl, 2));
}
- output_add_newline ((output_buffer *)context);
+ output_add_newline ((output_buffer *) context);
record_last_error_function ();
- output_buffer_to_stream ((output_buffer *)context);
+ output_buffer_to_stream ((output_buffer *) context);
output_buffer_state (context) = os;
free ((char*) prefix);
}
@@ -1128,7 +1128,7 @@
report_error_function (file)
const char *file ATTRIBUTE_UNUSED;
{
- report_problematic_module ((output_buffer *)global_dc);
+ report_problematic_module ((output_buffer *) global_dc);
(*print_error_function) (global_dc, input_filename);
}
@@ -1366,7 +1366,7 @@
(*diagnostic_starter (dc)) (diagnostic_buffer, dc);
output_format (diagnostic_buffer);
(*diagnostic_finalizer (dc)) (diagnostic_buffer, dc);
- diagnostic_finish ((output_buffer *)global_dc);
+ diagnostic_finish ((output_buffer *) global_dc);
output_buffer_state (diagnostic_buffer) = os;
}
@@ -1382,7 +1382,7 @@
error_recursion ()
{
if (diagnostic_lock < 3)
- diagnostic_finish ((output_buffer *)global_dc);
+ diagnostic_finish ((output_buffer *) global_dc);
fnotice (stderr,
"Internal compiler error: Error reporting routines re-entered.\n");
Index: doloop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doloop.c,v
retrieving revision 1.15
diff -u -r1.15 doloop.c
--- doloop.c 2001/11/30 02:16:31 1.15
+++ doloop.c 2002/01/04 01:56:30
@@ -1,5 +1,5 @@
/* Perform doloop optimizations
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
This file is part of GCC.
@@ -197,7 +197,7 @@
if (GET_CODE (max_value) == CONST_INT)
umax = INTVAL (max_value);
else
- umax = ((unsigned)2 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
+ umax = ((unsigned) 2 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
n_iterations_max = umax - umin;
break;
@@ -212,12 +212,12 @@
if (GET_CODE (min_value) == CONST_INT)
smin = INTVAL (min_value);
else
- smin = -((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1));
+ smin = -((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1));
if (GET_CODE (max_value) == CONST_INT)
smax = INTVAL (max_value);
else
- smax = ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
+ smax = ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
n_iterations_max = smax - smin;
break;
@@ -230,7 +230,7 @@
else
/* We need to conservatively assume that we might have the maximum
number of iterations without any additional knowledge. */
- n_iterations_max = ((unsigned)2 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
+ n_iterations_max = ((unsigned) 2 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
break;
default:
@@ -242,8 +242,8 @@
/* If we know that the iteration count is non-negative then adjust
n_iterations_max if it is so large that it appears negative. */
if (nonneg
- && n_iterations_max > ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)))
- n_iterations_max = ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
+ && n_iterations_max > ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)))
+ n_iterations_max = ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
return n_iterations_max;
}
@@ -308,8 +308,8 @@
return 0;
}
- /* Some targets (eg, PPC) use the count register for branch on table
- instructions. ??? This should be a target specific check. */
+ /* Some targets (eg, PPC) use the count register for branch on table
+ instructions. ??? This should be a target specific check. */
if (loop_info->has_tablejump)
{
if (loop_dump_stream)
@@ -469,13 +469,13 @@
/* Determine if the iteration counter will be non-negative.
Note that the maximum value loaded is iterations_max - 1. */
if ((unsigned HOST_WIDE_INT) INTVAL (iterations_max)
- <= ((unsigned)1 << (GET_MODE_BITSIZE (GET_MODE (counter_reg)) - 1)))
+ <= ((unsigned) 1 << (GET_MODE_BITSIZE (GET_MODE (counter_reg)) - 1)))
nonneg = 1;
break;
/* Abort if an invalid doloop pattern has been generated. */
default:
- abort();
+ abort ();
}
if (decrement_count)
@@ -649,7 +649,7 @@
}
else
/* Iteration var must be an induction variable to get here. */
- abort();
+ abort ();
if (INSN_UID (bl->biv->insn) < max_uid_for_loop
&& INSN_LUID (bl->biv->insn) < INSN_LUID (loop->scan_start))
@@ -691,7 +691,7 @@
/* If (abs (final - initial) % (abs_inc * unroll_number)
<= abs_inc * (unroll - 1)),
jump past following increment instruction. */
- label = gen_label_rtx();
+ label = gen_label_rtx ();
limit = abs_inc * (loop_info->unroll_number - 1);
emit_cmp_and_jump_insns (extra, GEN_INT (limit),
limit == 0 ? EQ : LEU, NULL_RTX,
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.344
diff -u -r1.344 dwarf2out.c
--- dwarf2out.c 2002/01/02 18:22:13 1.344
+++ dwarf2out.c 2002/01/04 01:56:33
@@ -931,7 +931,7 @@
static long
stack_adjust_offset (pattern)
- rtx pattern;
+ rtx pattern;
{
rtx src = SET_SRC (pattern);
rtx dest = SET_DEST (pattern);
@@ -966,7 +966,7 @@
/* We handle only adjustments by constant amount. */
if (GET_CODE (XEXP (src, 1)) != PLUS ||
GET_CODE (val) != CONST_INT)
- abort();
+ abort ();
offset = -INTVAL (val);
}
@@ -1484,7 +1484,7 @@
case PRE_MODIFY:
/* We can't handle variable size modifications. */
if (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1)) != CONST_INT)
- abort();
+ abort ();
offset = -INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1));
if (REGNO (XEXP (XEXP (dest, 0), 0)) != STACK_POINTER_REGNUM
@@ -5602,7 +5602,7 @@
static char *
gen_internal_sym (prefix)
- const char *prefix;
+ const char *prefix;
{
char buf[256];
static int label_num;
@@ -6343,7 +6343,7 @@
char *sym = AT_loc_list (a)->ll_symbol;
if (sym == 0)
- abort();
+ abort ();
dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym,
loc_section_label, "%s", name);
}
@@ -6600,7 +6600,7 @@
if (die->die_tag == DW_TAG_subprogram)
{
dw2_asm_output_addr (DWARF2_ADDR_SIZE, get_AT_low_pc (die),
- "Address");
+ "Address");
dw2_asm_output_delta (DWARF2_ADDR_SIZE, get_AT_hi_pc (die),
get_AT_low_pc (die), "Length");
}
@@ -7687,10 +7687,10 @@
is_based_loc (rtl)
rtx rtl;
{
- return (GET_CODE (rtl) == PLUS
- && ((GET_CODE (XEXP (rtl, 0)) == REG
- && REGNO (XEXP (rtl, 0)) < FIRST_PSEUDO_REGISTER
- && GET_CODE (XEXP (rtl, 1)) == CONST_INT)));
+ return (GET_CODE (rtl) == PLUS
+ && ((GET_CODE (XEXP (rtl, 0)) == REG
+ && REGNO (XEXP (rtl, 0)) < FIRST_PSEUDO_REGISTER
+ && GET_CODE (XEXP (rtl, 1)) == CONST_INT)));
}
/* The following routine converts the RTL for a variable or parameter