From b640d66262c4d69c55f2fe90cd5b2a3a0215e750 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 31 Jan 2001 19:58:32 +0000 Subject: [PATCH] Merge from gnu/dist: Make the null printf format string warning enabled only if -pedantic is supplied. This allows printf format attributes on err/warn. A fix to handle this properly is in the works for the next major gcc release. --- gnu/dist/toolchain/gcc/c-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/dist/toolchain/gcc/c-common.c b/gnu/dist/toolchain/gcc/c-common.c index e61fddac4ecc..f9c16d0e781f 100644 --- a/gnu/dist/toolchain/gcc/c-common.c +++ b/gnu/dist/toolchain/gcc/c-common.c @@ -1398,7 +1398,8 @@ check_format_info (info, params) if (integer_zerop (format_tree)) { - warning ("null format string"); + if (pedantic) + warning ("null format string"); return; } if (TREE_CODE (format_tree) != ADDR_EXPR)