(format_char_info, case 'm'): Set type to void.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 14 Jun 1995 21:39:03 +0000 (17:39 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 14 Jun 1995 21:39:03 +0000 (17:39 -0400)
(check_format_info): If type is void, ignore operand.

From-SVN: r9954

gcc/c-common.c

index 0491952eacc029af785f60f63d0bbd70624b2bd7..fad2701b78bc76c9a1ad3010c15f5f26c63c19a9 100644 (file)
@@ -693,7 +693,7 @@ static format_char_info print_char_table[] = {
   { "u",       0,      T_UI,   T_UI,   T_UL,   T_ULL,  T_ULL,  "-wp0"          },
 /* Two GNU extensions.  */
   { "Z",       0,      T_ST,   NULL,   NULL,   NULL,   NULL,   "-wp0"          },
-  { "m",       0,      T_UI,   T_UI,   T_UL,   NULL,   NULL,   "-wp"           },
+  { "m",       0,      T_V,    NULL,   NULL,   NULL,   NULL,   "-wp"           },
   { "feEgG",   0,      T_D,    NULL,   NULL,   NULL,   T_LD,   "-wp0 +#"       },
   { "c",       0,      T_I,    NULL,   T_W,    NULL,   NULL,   "-w"            },
   { "C",       0,      T_W,    NULL,   NULL,   NULL,   NULL,   "-w"            },
@@ -1194,6 +1194,9 @@ check_format_info (info, params)
       /* Finally. . .check type of argument against desired type!  */
       if (info->first_arg_num == 0)
        continue;
+      if (fci->pointer_count == 0 && wanted_type == void_type_node)
+       /* This specifier takes no argument.  */
+       continue;
       if (params == 0)
        {
          warning (tfaff);