Commit 173bf5be by Kazu Hirata Committed by Kazu Hirata

c-common.c: Fix formatting.

	* c-common.c: Fix formatting.
	* diagnostic.c: Likewise.
	* doloop.c: Likewise.
	* dwarf2out.c: Likewise.

From-SVN: r48526
parent 0b223645
2002-01-03 Kazu Hirata <kazu@hxi.com> 2002-01-03 Kazu Hirata <kazu@hxi.com>
* c-common.c: Fix formatting.
* diagnostic.c: Likewise.
* doloop.c: Likewise.
* dwarf2out.c: Likewise.
2002-01-03 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.c (output_logical_op): Use 'not.w' instead * config/h8300/h8300.c (output_logical_op): Use 'not.w' instead
of 'neg.w' when xoring with 0x0000ffff or 0xffff0000. of 'neg.w' when xoring with 0x0000ffff or 0xffff0000.
......
...@@ -281,12 +281,12 @@ c_expand_start_cond (cond, compstmt_count) ...@@ -281,12 +281,12 @@ c_expand_start_cond (cond, compstmt_count)
if (if_stack_space == 0) if (if_stack_space == 0)
{ {
if_stack_space = 10; 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) else if (if_stack_space == if_stack_pointer)
{ {
if_stack_space += 10; 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); if_stmt = build_stmt (IF_STMT, NULL_TREE, NULL_TREE, NULL_TREE);
...@@ -2372,7 +2372,7 @@ c_common_nodes_and_builtins () ...@@ -2372,7 +2372,7 @@ c_common_nodes_and_builtins ()
typedef enum builtin_type builtin_type; typedef enum builtin_type builtin_type;
tree builtin_types[(int)BT_LAST]; tree builtin_types[(int) BT_LAST];
int wchar_type_size; int wchar_type_size;
tree array_domain_type; tree array_domain_type;
/* Either char* or void*. */ /* Either char* or void*. */
...@@ -3457,7 +3457,7 @@ c_expand_expr (exp, target, tmode, modifier) ...@@ -3457,7 +3457,7 @@ c_expand_expr (exp, target, tmode, modifier)
== BUILT_IN_FRONTEND)) == BUILT_IN_FRONTEND))
return c_expand_builtin (exp, target, tmode, modifier); return c_expand_builtin (exp, target, tmode, modifier);
else else
abort(); abort ();
} }
break; break;
...@@ -3572,13 +3572,13 @@ add_c_tree_codes () ...@@ -3572,13 +3572,13 @@ add_c_tree_codes ()
{ {
memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE, memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
c_tree_code_type, 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, memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
c_tree_code_length, 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, memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
c_tree_code_name, 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; lang_unsafe_for_reeval = c_unsafe_for_reeval;
} }
...@@ -3610,28 +3610,28 @@ c_expand_builtin (exp, target, tmode, modifier) ...@@ -3610,28 +3610,28 @@ c_expand_builtin (exp, target, tmode, modifier)
{ {
case BUILT_IN_PRINTF: case BUILT_IN_PRINTF:
target = c_expand_builtin_printf (arglist, target, tmode, target = c_expand_builtin_printf (arglist, target, tmode,
modifier, ignore,/*unlocked=*/ 0); modifier, ignore, /*unlocked=*/ 0);
if (target) if (target)
return target; return target;
break; break;
case BUILT_IN_PRINTF_UNLOCKED: case BUILT_IN_PRINTF_UNLOCKED:
target = c_expand_builtin_printf (arglist, target, tmode, target = c_expand_builtin_printf (arglist, target, tmode,
modifier, ignore,/*unlocked=*/ 1); modifier, ignore, /*unlocked=*/ 1);
if (target) if (target)
return target; return target;
break; break;
case BUILT_IN_FPRINTF: case BUILT_IN_FPRINTF:
target = c_expand_builtin_fprintf (arglist, target, tmode, target = c_expand_builtin_fprintf (arglist, target, tmode,
modifier, ignore,/*unlocked=*/ 0); modifier, ignore, /*unlocked=*/ 0);
if (target) if (target)
return target; return target;
break; break;
case BUILT_IN_FPRINTF_UNLOCKED: case BUILT_IN_FPRINTF_UNLOCKED:
target = c_expand_builtin_fprintf (arglist, target, tmode, target = c_expand_builtin_fprintf (arglist, target, tmode,
modifier, ignore,/*unlocked=*/ 1); modifier, ignore, /*unlocked=*/ 1);
if (target) if (target)
return target; return target;
break; break;
......
/* Language-independent diagnostic subroutines for the GNU C compiler /* 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> Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC. This file is part of GCC.
...@@ -722,7 +722,7 @@ output_format (buffer) ...@@ -722,7 +722,7 @@ output_format (buffer)
if (*++output_buffer_text_cursor (buffer) != '*') if (*++output_buffer_text_cursor (buffer) != '*')
abort (); abort ();
else if (*++output_buffer_text_cursor (buffer) != 's') else if (*++output_buffer_text_cursor (buffer) != 's')
abort(); abort ();
n = va_arg (output_buffer_format_args (buffer), int); n = va_arg (output_buffer_format_args (buffer), int);
s = va_arg (output_buffer_format_args (buffer), const char *); s = va_arg (output_buffer_format_args (buffer), const char *);
output_append (buffer, s, s + n); output_append (buffer, s, s + n);
...@@ -912,7 +912,7 @@ diagnostic_for_decl (decl, msgid, args_ptr, warn) ...@@ -912,7 +912,7 @@ diagnostic_for_decl (decl, msgid, args_ptr, warn)
output_buffer_ptr_to_format_args (diagnostic_buffer) = args_ptr; output_buffer_ptr_to_format_args (diagnostic_buffer) = args_ptr;
output_buffer_text_cursor (diagnostic_buffer) = _(msgid); output_buffer_text_cursor (diagnostic_buffer) = _(msgid);
format_with_decl (diagnostic_buffer, decl); format_with_decl (diagnostic_buffer, decl);
diagnostic_finish ((output_buffer *)global_dc); diagnostic_finish ((output_buffer *) global_dc);
output_destroy_prefix (diagnostic_buffer); output_destroy_prefix (diagnostic_buffer);
output_buffer_state (diagnostic_buffer) = os; output_buffer_state (diagnostic_buffer) = os;
...@@ -979,7 +979,7 @@ fatal_io_error VPARAMS ((const char *msgid, ...)) ...@@ -979,7 +979,7 @@ fatal_io_error VPARAMS ((const char *msgid, ...))
output_buffer_ptr_to_format_args (diagnostic_buffer) = &ap; output_buffer_ptr_to_format_args (diagnostic_buffer) = &ap;
output_buffer_text_cursor (diagnostic_buffer) = _(msgid); output_buffer_text_cursor (diagnostic_buffer) = _(msgid);
output_format (diagnostic_buffer); output_format (diagnostic_buffer);
diagnostic_finish ((output_buffer *)global_dc); diagnostic_finish ((output_buffer *) global_dc);
output_buffer_state (diagnostic_buffer) = os; output_buffer_state (diagnostic_buffer) = os;
VA_CLOSE (ap); VA_CLOSE (ap);
exit (FATAL_EXIT_CODE); exit (FATAL_EXIT_CODE);
...@@ -1058,7 +1058,7 @@ sorry VPARAMS ((const char *msgid, ...)) ...@@ -1058,7 +1058,7 @@ sorry VPARAMS ((const char *msgid, ...))
output_buffer_ptr_to_format_args (diagnostic_buffer) = &ap; output_buffer_ptr_to_format_args (diagnostic_buffer) = &ap;
output_buffer_text_cursor (diagnostic_buffer) = _(msgid); output_buffer_text_cursor (diagnostic_buffer) = _(msgid);
output_format (diagnostic_buffer); output_format (diagnostic_buffer);
diagnostic_finish ((output_buffer *)global_dc); diagnostic_finish ((output_buffer *) global_dc);
output_buffer_state (diagnostic_buffer) = os; output_buffer_state (diagnostic_buffer) = os;
VA_CLOSE (ap); VA_CLOSE (ap);
} }
...@@ -1096,25 +1096,25 @@ default_print_error_function (context, file) ...@@ -1096,25 +1096,25 @@ default_print_error_function (context, file)
output_state os; output_state os;
os = output_buffer_state (context); os = output_buffer_state (context);
output_set_prefix ((output_buffer *)context, prefix); output_set_prefix ((output_buffer *) context, prefix);
if (current_function_decl == NULL) if (current_function_decl == NULL)
output_add_string ((output_buffer *)context, _("At top level:")); output_add_string ((output_buffer *) context, _("At top level:"));
else else
{ {
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
output_printf output_printf
((output_buffer *)context, "In member function `%s':", ((output_buffer *) context, "In member function `%s':",
(*decl_printable_name) (current_function_decl, 2)); (*decl_printable_name) (current_function_decl, 2));
else else
output_printf output_printf
((output_buffer *)context, "In function `%s':", ((output_buffer *) context, "In function `%s':",
(*decl_printable_name) (current_function_decl, 2)); (*decl_printable_name) (current_function_decl, 2));
} }
output_add_newline ((output_buffer *)context); output_add_newline ((output_buffer *) context);
record_last_error_function (); record_last_error_function ();
output_buffer_to_stream ((output_buffer *)context); output_buffer_to_stream ((output_buffer *) context);
output_buffer_state (context) = os; output_buffer_state (context) = os;
free ((char*) prefix); free ((char*) prefix);
} }
...@@ -1128,7 +1128,7 @@ void ...@@ -1128,7 +1128,7 @@ void
report_error_function (file) report_error_function (file)
const char *file ATTRIBUTE_UNUSED; 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); (*print_error_function) (global_dc, input_filename);
} }
...@@ -1366,7 +1366,7 @@ report_diagnostic (dc) ...@@ -1366,7 +1366,7 @@ report_diagnostic (dc)
(*diagnostic_starter (dc)) (diagnostic_buffer, dc); (*diagnostic_starter (dc)) (diagnostic_buffer, dc);
output_format (diagnostic_buffer); output_format (diagnostic_buffer);
(*diagnostic_finalizer (dc)) (diagnostic_buffer, dc); (*diagnostic_finalizer (dc)) (diagnostic_buffer, dc);
diagnostic_finish ((output_buffer *)global_dc); diagnostic_finish ((output_buffer *) global_dc);
output_buffer_state (diagnostic_buffer) = os; output_buffer_state (diagnostic_buffer) = os;
} }
...@@ -1382,7 +1382,7 @@ static void ...@@ -1382,7 +1382,7 @@ static void
error_recursion () error_recursion ()
{ {
if (diagnostic_lock < 3) if (diagnostic_lock < 3)
diagnostic_finish ((output_buffer *)global_dc); diagnostic_finish ((output_buffer *) global_dc);
fnotice (stderr, fnotice (stderr,
"Internal compiler error: Error reporting routines re-entered.\n"); "Internal compiler error: Error reporting routines re-entered.\n");
......
/* Perform doloop optimizations /* 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) Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
This file is part of GCC. This file is part of GCC.
...@@ -197,7 +197,7 @@ doloop_iterations_max (loop_info, mode, nonneg) ...@@ -197,7 +197,7 @@ doloop_iterations_max (loop_info, mode, nonneg)
if (GET_CODE (max_value) == CONST_INT) if (GET_CODE (max_value) == CONST_INT)
umax = INTVAL (max_value); umax = INTVAL (max_value);
else else
umax = ((unsigned)2 << (GET_MODE_BITSIZE (mode) - 1)) - 1; umax = ((unsigned) 2 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
n_iterations_max = umax - umin; n_iterations_max = umax - umin;
break; break;
...@@ -212,12 +212,12 @@ doloop_iterations_max (loop_info, mode, nonneg) ...@@ -212,12 +212,12 @@ doloop_iterations_max (loop_info, mode, nonneg)
if (GET_CODE (min_value) == CONST_INT) if (GET_CODE (min_value) == CONST_INT)
smin = INTVAL (min_value); smin = INTVAL (min_value);
else else
smin = -((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)); smin = -((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1));
if (GET_CODE (max_value) == CONST_INT) if (GET_CODE (max_value) == CONST_INT)
smax = INTVAL (max_value); smax = INTVAL (max_value);
else else
smax = ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1)) - 1; smax = ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)) - 1;
n_iterations_max = smax - smin; n_iterations_max = smax - smin;
break; break;
...@@ -230,7 +230,7 @@ doloop_iterations_max (loop_info, mode, nonneg) ...@@ -230,7 +230,7 @@ doloop_iterations_max (loop_info, mode, nonneg)
else else
/* We need to conservatively assume that we might have the maximum /* We need to conservatively assume that we might have the maximum
number of iterations without any additional knowledge. */ 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; break;
default: default:
...@@ -242,8 +242,8 @@ doloop_iterations_max (loop_info, mode, nonneg) ...@@ -242,8 +242,8 @@ doloop_iterations_max (loop_info, mode, nonneg)
/* If we know that the iteration count is non-negative then adjust /* If we know that the iteration count is non-negative then adjust
n_iterations_max if it is so large that it appears negative. */ n_iterations_max if it is so large that it appears negative. */
if (nonneg if (nonneg
&& n_iterations_max > ((unsigned)1 << (GET_MODE_BITSIZE (mode) - 1))) && 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)) - 1;
return n_iterations_max; return n_iterations_max;
} }
...@@ -469,13 +469,13 @@ doloop_modify (loop, iterations, iterations_max, ...@@ -469,13 +469,13 @@ doloop_modify (loop, iterations, iterations_max,
/* Determine if the iteration counter will be non-negative. /* Determine if the iteration counter will be non-negative.
Note that the maximum value loaded is iterations_max - 1. */ Note that the maximum value loaded is iterations_max - 1. */
if ((unsigned HOST_WIDE_INT) INTVAL (iterations_max) 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; nonneg = 1;
break; break;
/* Abort if an invalid doloop pattern has been generated. */ /* Abort if an invalid doloop pattern has been generated. */
default: default:
abort(); abort ();
} }
if (decrement_count) if (decrement_count)
...@@ -649,7 +649,7 @@ doloop_modify_runtime (loop, iterations_max, ...@@ -649,7 +649,7 @@ doloop_modify_runtime (loop, iterations_max,
} }
else else
/* Iteration var must be an induction variable to get here. */ /* Iteration var must be an induction variable to get here. */
abort(); abort ();
if (INSN_UID (bl->biv->insn) < max_uid_for_loop if (INSN_UID (bl->biv->insn) < max_uid_for_loop
&& INSN_LUID (bl->biv->insn) < INSN_LUID (loop->scan_start)) && INSN_LUID (bl->biv->insn) < INSN_LUID (loop->scan_start))
...@@ -691,7 +691,7 @@ doloop_modify_runtime (loop, iterations_max, ...@@ -691,7 +691,7 @@ doloop_modify_runtime (loop, iterations_max,
/* If (abs (final - initial) % (abs_inc * unroll_number) /* If (abs (final - initial) % (abs_inc * unroll_number)
<= abs_inc * (unroll - 1)), <= abs_inc * (unroll - 1)),
jump past following increment instruction. */ jump past following increment instruction. */
label = gen_label_rtx(); label = gen_label_rtx ();
limit = abs_inc * (loop_info->unroll_number - 1); limit = abs_inc * (loop_info->unroll_number - 1);
emit_cmp_and_jump_insns (extra, GEN_INT (limit), emit_cmp_and_jump_insns (extra, GEN_INT (limit),
limit == 0 ? EQ : LEU, NULL_RTX, limit == 0 ? EQ : LEU, NULL_RTX,
......
...@@ -966,7 +966,7 @@ stack_adjust_offset (pattern) ...@@ -966,7 +966,7 @@ stack_adjust_offset (pattern)
/* We handle only adjustments by constant amount. */ /* We handle only adjustments by constant amount. */
if (GET_CODE (XEXP (src, 1)) != PLUS || if (GET_CODE (XEXP (src, 1)) != PLUS ||
GET_CODE (val) != CONST_INT) GET_CODE (val) != CONST_INT)
abort(); abort ();
offset = -INTVAL (val); offset = -INTVAL (val);
} }
...@@ -1484,7 +1484,7 @@ dwarf2out_frame_debug_expr (expr, label) ...@@ -1484,7 +1484,7 @@ dwarf2out_frame_debug_expr (expr, label)
case PRE_MODIFY: case PRE_MODIFY:
/* We can't handle variable size modifications. */ /* We can't handle variable size modifications. */
if (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1)) != CONST_INT) if (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1)) != CONST_INT)
abort(); abort ();
offset = -INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1)); offset = -INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1));
if (REGNO (XEXP (XEXP (dest, 0), 0)) != STACK_POINTER_REGNUM if (REGNO (XEXP (XEXP (dest, 0), 0)) != STACK_POINTER_REGNUM
...@@ -6343,7 +6343,7 @@ output_die (die) ...@@ -6343,7 +6343,7 @@ output_die (die)
char *sym = AT_loc_list (a)->ll_symbol; char *sym = AT_loc_list (a)->ll_symbol;
if (sym == 0) if (sym == 0)
abort(); abort ();
dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym, dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym,
loc_section_label, "%s", name); loc_section_label, "%s", name);
} }
......
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