]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd: guard ARCH_SIZE uses to avoid -Wundef
authorAndrew Hanson <andrew@andrewhanson.dev>
Fri, 26 Sep 2025 10:22:37 +0000 (12:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Sep 2025 10:22:37 +0000 (12:22 +0200)
bfd/

* elf-bfd.h: Use `defined(ARCH_SIZE)` instead of testing ARCH_SIZE
directly, to silence -Wundef when ARCH_SIZE is not defined.

Signed-off-by: Andrew Hanson <andrew@andrewhanson.dev>
bfd/elf-bfd.h

index 51e6ae7bb78df85cab6ec7e800e69ce0356d87bd..9ce81ebd3141ed65334b07d7182b187cf5ba0c38 100644 (file)
@@ -46,7 +46,7 @@ extern "C" {
 #define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_entsize > 0 ? (shdr)->sh_size / (shdr)->sh_entsize : 0)
 
 /* If size isn't specified as 64 or 32, NAME macro should fail.  */
-#ifndef NAME
+#if !defined(NAME) && defined(ARCH_SIZE)
 #if ARCH_SIZE == 64
 #define NAME(x, y) x ## 64 ## _ ## y
 #endif