summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2026-05-22 17:15:18 +0200
committerYann Gautier <yann.gautier@st.com>2026-06-22 19:42:36 +0200
commit1266b4492d33780d5cf075b5cf028fc238022da8 (patch)
treeeefc025dde40c3739b9c32048573c86e6ba7405d /include
parent552ca6fa44d0cb0225346f0bd0272823af7e30ea (diff)
downloadarm-trusted-firmware-1266b4492d33780d5cf075b5cf028fc238022da8.tar.gz
arm-trusted-firmware-1266b4492d33780d5cf075b5cf028fc238022da8.zip
fix(cpus): check __clang_major__ is defined
First check __clang_major__ is defined, before checking its value. This is done the same way in lib/compiler-rt/builtins/int_types.h. This corrects a compiler warning with -Wundef. Change-Id: Ibd8b1014542e787eece799934b9c8bf8f93bb21a Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'include')
-rw-r--r--include/lib/cpus/aarch64/cpu_macros.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib/cpus/aarch64/cpu_macros.S b/include/lib/cpus/aarch64/cpu_macros.S
index a25e20cfb..334ab7cc4 100644
--- a/include/lib/cpus/aarch64/cpu_macros.S
+++ b/include/lib/cpus/aarch64/cpu_macros.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2025, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2026, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -547,7 +547,7 @@
.endm
-#if __clang_major__ < 17
+#if defined(__clang_major__) && __clang_major__ < 17
/*
* A problem with clang version < 17 can cause resolving nested
* 'cfi_startproc' to fail compilation.