From: Richard Kenner Date: Tue, 26 Sep 1995 20:36:10 +0000 (-0400) Subject: (check_format_info): Don't warn about format type mismatch if the X-Git-Tag: misc/cutover-egcs-0~3563 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8741664047034e6bb35eb06645ceeb3a08eb6a3a;p=thirdparty%2Fgcc.git (check_format_info): Don't warn about format type mismatch if the argument is an ERROR_MARK. From-SVN: r10401 --- diff --git a/gcc/c-common.c b/gcc/c-common.c index 3d5d3f29e13d..41362faf2c49 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1224,16 +1224,20 @@ check_format_info (info, params) cur_type = TREE_TYPE (cur_type); continue; } - sprintf (message, - "format argument is not a %s (arg %d)", - ((fci->pointer_count == 1) ? "pointer" : "pointer to a pointer"), - arg_num); - warning (message); + if (TREE_CODE (cur_type) != ERROR_MARK) + { + sprintf (message, + "format argument is not a %s (arg %d)", + ((fci->pointer_count == 1) ? "pointer" : "pointer to a pointer"), + arg_num); + warning (message); + } break; } /* Check the type of the "real" argument, if there's a type we want. */ if (i == fci->pointer_count && wanted_type != 0 + && TREE_CODE (cur_type) != ERROR_MARK && wanted_type != TYPE_MAIN_VARIANT (cur_type) /* If we want `void *', allow any pointer type. (Anything else would already have got a warning.) */