]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-family: Fix bootstrap for targets defining TARGET_FORMAT_TYPES.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 2 Oct 2021 08:19:24 +0000 (09:19 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 2 Oct 2021 08:19:24 +0000 (09:19 +0100)
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 <iain@sandoe.co.uk>
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

index b4cb765a9d349e65c9ce13871c2806965a91dd3f..ca66c81f7166f70cae7368dbaaea39b1e3ed2f22 100644 (file)
@@ -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);