aboutsummaryrefslogtreecommitdiff
path: root/libatomic
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2021-07-21 10:48:55 -0600
committerMartin Sebor <msebor@redhat.com>2021-07-21 10:51:50 -0600
commitb937dbf2577e0fa3018c562312da7b08bbe72d70 (patch)
treedf6354202107797a664c93a58da0b52eeff347e8 /libatomic
parent8edb61420502c62fa2cccdd98876a9aa039b72a6 (diff)
downloadgcc-b937dbf2577e0fa3018c562312da7b08bbe72d70.zip
gcc-b937dbf2577e0fa3018c562312da7b08bbe72d70.tar.gz
gcc-b937dbf2577e0fa3018c562312da7b08bbe72d70.tar.bz2
Adjust macro to avoid warning [PR101379].
Resolves: PR bootstrap/101379 - libatomic arm build failure after r12-2132 due to -Warray-bounds on a constant address libatomic/ChangeLog: PR bootstrap/101379 * config/linux/arm/host-config.h (__kernel_helper_version): New function. Adjust shadow macro.
Diffstat (limited to 'libatomic')
-rw-r--r--libatomic/config/linux/arm/host-config.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libatomic/config/linux/arm/host-config.h b/libatomic/config/linux/arm/host-config.h
index 1520f23..777d08a 100644
--- a/libatomic/config/linux/arm/host-config.h
+++ b/libatomic/config/linux/arm/host-config.h
@@ -39,8 +39,14 @@ typedef void (__kernel_dmb_t) (void);
#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0)
/* Kernel helper page version number. */
-#define __kernel_helper_version (*(unsigned int *)0xffff0ffc)
+static inline unsigned*
+__kernel_helper_version ()
+{
+ unsigned *volatile addr = (unsigned int *)0xffff0ffc;
+ return addr;
+}
+#define __kernel_helper_version (*__kernel_helper_version())
#ifndef HAVE_STREX
static inline bool