OSDN Git Service

* stor-layout.c (layout_type): Complain if an array's size can
[pf3gnuchains/gcc-fork.git] / gcc / print-rtl.c
index b421282..9d4fbbf 100644 (file)
@@ -2,22 +2,22 @@
    Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000
    Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
 
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
 
 You should have received a copy of the GNU General Public License
-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.  */
+along with GCC; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.  */
 
 
 #include "config.h"
@@ -47,8 +47,6 @@ const char * reg_names[] = REGISTER_NAMES;
 
 static FILE *outfile;
 
-static const char xspaces[] = "                                                                                                                                                                ";
-
 static int sawclose = 0;
 
 static int indent;
@@ -91,9 +89,8 @@ print_rtx (in_rtx)
       if (flag_simple)
        fputc (' ', outfile);
       else
-       fprintf (outfile, "\n%s%s",
-                print_rtx_head,
-                (xspaces + (sizeof xspaces - 1 - indent * 2)));
+       fprintf (outfile, "\n%s%*s",
+                print_rtx_head, indent * 2, "");
       sawclose = 0;
     }
 
@@ -166,16 +163,25 @@ print_rtx (in_rtx)
   for (; i < GET_RTX_LENGTH (GET_CODE (in_rtx)); i++)
     switch (*format_ptr++)
       {
+       const char *str;
+
+      case 'T':
+       str = XTMPL (in_rtx, i);
+       goto string;
+
       case 'S':
       case 's':
-       if (XSTR (in_rtx, i) == 0)
+       str = XSTR (in_rtx, i);
+      string:
+
+       if (str == 0)
          fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
        else
          {
            if (dump_for_graph)
-             fprintf (outfile, " (\\\"%s\\\")", XSTR (in_rtx, i));
+             fprintf (outfile, " (\\\"%s\\\")", str);
            else
-             fprintf (outfile, " (\"%s\")", XSTR (in_rtx, i));
+             fprintf (outfile, " (\"%s\")", str);
          }
        sawclose = 1;
        break;
@@ -282,9 +288,8 @@ print_rtx (in_rtx)
        indent += 2;
        if (sawclose)
          {
-           fprintf (outfile, "\n%s%s",
-                     print_rtx_head,
-                    (xspaces + (sizeof xspaces - 1 - indent * 2)));
+           fprintf (outfile, "\n%s%*s",
+                     print_rtx_head, indent * 2, "");
            sawclose = 0;
          }
        fputs ("[ ", outfile);
@@ -300,9 +305,8 @@ print_rtx (in_rtx)
            indent -= 2;
          }
        if (sawclose)
-         fprintf (outfile, "\n%s%s",
-                   print_rtx_head,
-                  (xspaces + (sizeof xspaces - 1 - indent * 2)));
+         fprintf (outfile, "\n%s%*s",
+                   print_rtx_head, indent * 2, "");
 
        fputs ("] ", outfile);
        sawclose = 1;
@@ -373,8 +377,8 @@ print_rtx (in_rtx)
       /* Print NOTE_INSN names rather than integer codes.  */
 
       case 'n':
-       if (XINT (in_rtx, i) >= NOTE_INSN_BIAS
-           && XINT (in_rtx, i) < NOTE_INSN_MAX)
+       if (XINT (in_rtx, i) >= (int) NOTE_INSN_BIAS
+           && XINT (in_rtx, i) < (int) NOTE_INSN_MAX)
          fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
        else
          fprintf (outfile, " %d", XINT (in_rtx, i));