]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/c-aux-info.c
(make_insn_raw): Eliminate unused argument pat_formals. All calls changed.
[gcc.git] / gcc / c-aux-info.c
index 76b480cdcee478414bf363a186c98725d2728a12..2e1506447e3552cb0c44d317607a5dc80311883d 100644 (file)
@@ -126,12 +126,12 @@ affix_data_type (type_or_decl)
 
   for (;;)
     {
-      if (!strncmp (p, "volatile", 8))
+      if (!strncmp (p, "volatile ", 9))
         {
           p += 9;
           continue;
         }
-      if (!strncmp (p, "const", 5))
+      if (!strncmp (p, "const ", 6))
         {
           p += 6;
           continue;
@@ -384,7 +384,18 @@ gen_type (ret_val, t, style)
           return ret_val;
 
         case ARRAY_TYPE:
-          ret_val = gen_type (concat (ret_val, "[]"), TREE_TYPE (t), style);
+         if (TYPE_SIZE (t) == 0 || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST)
+           ret_val = gen_type (concat (ret_val, "[]"), TREE_TYPE (t), style);
+         else if (int_size_in_bytes (t) == 0)
+           ret_val = gen_type (concat (ret_val, "[0]"), TREE_TYPE (t), style);
+         else
+           {
+             int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t)));
+             char buff[10];
+             sprintf (buff, "[%d]", size);
+             ret_val = gen_type (concat (ret_val, buff),
+                                 TREE_TYPE (t), style);
+           }
           break;
 
         case FUNCTION_TYPE:
@@ -568,7 +579,7 @@ gen_decl (decl, is_func_definition, style)
 
   ret_val = affix_data_type (ret_val);
 
-  if (TREE_REGDECL (decl))
+  if (DECL_REGISTER (decl))
     ret_val = concat ("register ", ret_val);
   if (TREE_PUBLIC (decl))
     ret_val = concat ("extern ", ret_val);
This page took 0.034459 seconds and 5 git commands to generate.