diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2021-10-02 09:19:24 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-10-02 09:19:24 +0100 |
commit | fc0beded58a909d6bcdc4af669d89341cdd601c3 (patch) | |
tree | e90d39f91e4dbc88de26ca816fefcd20d2e367d2 | |
parent | 5f0285418940577142b3891d756f7de767bfc537 (diff) | |
download | gcc-fc0beded58a909d6bcdc4af669d89341cdd601c3.zip gcc-fc0beded58a909d6bcdc4af669d89341cdd601c3.tar.gz gcc-fc0beded58a909d6bcdc4af669d89341cdd601c3.tar.bz2 |
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 <iain@sandoe.co.uk>
gcc/c-family/ChangeLog:
* c-format.c: Remove a test of TARGET_FORMAT_TYPES with
NULL, this is not needed.
-rw-r--r-- | gcc/c-family/c-format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index b4cb765a..ca66c81 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); |