From fc0beded58a909d6bcdc4af669d89341cdd601c3 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 2 Oct 2021 09:19:24 +0100 Subject: [PATCH] c-family: Fix bootstrap for targets defining TARGET_FORMAT_TYPES. A recent improvement in Waddress causes a bootstrap failure on targets that define TARGET_FORMAT_TYPES since it cannot be NULL if defined to an address. There is no default for this target macro, and it would seem no purpose to defining it to NULL, so the warning appears reasonable. Fixed by removing the pointless test. Signed-off-by: Iain Sandoe gcc/c-family/ChangeLog: * c-format.c: Remove a test of TARGET_FORMAT_TYPES with NULL, this is not needed. --- gcc/c-family/c-format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index b4cb765a9d34..ca66c81f7166 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -5150,7 +5150,7 @@ handle_format_attribute (tree *node, tree atname, tree args, #ifdef TARGET_FORMAT_TYPES /* If the target provides additional format types, we need to add them to FORMAT_TYPES at first use. */ - if (TARGET_FORMAT_TYPES != NULL && !dynamic_format_types) + if (!dynamic_format_types) { dynamic_format_types = XNEWVEC (format_kind_info, n_format_types + TARGET_N_FORMAT_TYPES); -- 2.47.2