aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-06-14 17:39:03 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-06-14 17:39:03 -0400
commit2a13575e8ac66a9bf9001d2434978d3269f14f00 (patch)
treeed00c894ce0a17f9855049fe6f5926c781465bf4 /gcc
parentf7ca2fe71eec8d63b543403751db9649b6f4016f (diff)
downloadgcc-2a13575e8ac66a9bf9001d2434978d3269f14f00.zip
gcc-2a13575e8ac66a9bf9001d2434978d3269f14f00.tar.gz
gcc-2a13575e8ac66a9bf9001d2434978d3269f14f00.tar.bz2
(format_char_info, case 'm'): Set type to void.
(check_format_info): If type is void, ignore operand. From-SVN: r9954
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 0491952..fad2701 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -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);