OSDN Git Service

* c-common.c: Fix formatting.
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Jan 2002 02:00:26 +0000 (02:00 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Jan 2002 02:00:26 +0000 (02:00 +0000)
* diagnostic.c: Likewise.
* doloop.c: Likewise.
* dwarf2out.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48526 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.c
gcc/diagnostic.c
gcc/doloop.c
gcc/dwarf2out.c

index 7283a0c..57b4c66 100644 (file)
@@ -1,5 +1,12 @@
 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
        of 'neg.w' when xoring with 0x0000ffff or 0xffff0000.
 
index 39ae17d..f5f4487 100644 (file)
@@ -281,12 +281,12 @@ c_expand_start_cond (cond, compstmt_count)
   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 @@ c_alignof_expr (expr)
       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 @@ c_alignof_expr (expr)
       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 @@ c_common_nodes_and_builtins ()
 
   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 @@ c_expand_expr (exp, target, tmode, modifier)
                == BUILT_IN_FRONTEND))
          return c_expand_builtin (exp, target, tmode, modifier);
        else
-         abort();
+         abort ();
       }
       break;
 
@@ -3572,13 +3572,13 @@ add_c_tree_codes ()
 {
   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 @@ c_expand_builtin (exp, target, tmode, modifier)
     {
     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 @@ c_expand_builtin (exp, target, tmode, modifier)
    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 @@ c_expand_builtin_printf (arglist, target, tmode, modifier, ignore, unlocked)
     }
   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 @@ c_expand_builtin_fprintf (arglist, target, tmode, modifier, ignore, unlocked)
     }
   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 d3b5ea1..d566401 100644 (file)
@@ -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 @@ output_format (buffer)
             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 @@ diagnostic_for_decl (decl, msgid, args_ptr, warn)
       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 @@ fatal_io_error VPARAMS ((const char *msgid, ...))
   output_buffer_ptr_to_format_args (diagnostic_buffer) = &ap;
   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 @@ sorry VPARAMS ((const char *msgid, ...))
   output_buffer_ptr_to_format_args (diagnostic_buffer) = &ap;
   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 @@ default_print_error_function (context, file)
       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 @@ void
 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 @@ report_diagnostic (dc)
       (*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 @@ static void
 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 f6b765a..6c0185c 100644 (file)
@@ -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 @@ doloop_iterations_max (loop_info, mode, nonneg)
        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 @@ doloop_iterations_max (loop_info, mode, nonneg)
        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 @@ doloop_iterations_max (loop_info, mode, nonneg)
       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 @@ doloop_iterations_max (loop_info, mode, nonneg)
   /* 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 @@ doloop_valid_p (loop, jump_insn)
       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 @@ doloop_modify (loop, iterations, iterations_max,
       /* 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 @@ doloop_modify_runtime (loop, iterations_max,
        }
       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 @@ doloop_modify_runtime (loop, iterations_max,
          /* 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 298005a..d754d5e 100644 (file)
@@ -931,7 +931,7 @@ initial_return_save (rtl)
 
 static long
 stack_adjust_offset (pattern)
-  rtx pattern;
+     rtx pattern;
 {
   rtx src = SET_SRC (pattern);
   rtx dest = SET_DEST (pattern);
@@ -966,7 +966,7 @@ stack_adjust_offset (pattern)
          /* 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 @@ dwarf2out_frame_debug_expr (expr, label)
        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 @@ is_symbol_die (c)
 
 static char *
 gen_internal_sym (prefix)
-       const char *prefix;
+     const char *prefix;
 {
   char buf[256];
   static int label_num;
@@ -6343,7 +6343,7 @@ output_die (die)
            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 @@ output_aranges ()
       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 @@ static inline int
 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