https://gcc.gnu.org/g:dca6f3534d2b6c52cecc770c40b204fb5e4a12b3
commit r16-694-gdca6f3534d2b6c52cecc770c40b204fb5e4a12b3 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Fri May 9 21:13:48 2025 -0700 aarch64: Fix narrowing warning in driver-aarch64.cc [PR118603] Since the AARCH64_CORE defines in aarch64-cores.def all use -1 for the variant, it is just easier to add the cast to unsigned in the usage in driver-aarch64.cc. Build and tested on aarch64-linux-gnu. gcc/ChangeLog: PR target/118603 * config/aarch64/driver-aarch64.cc (aarch64_cpu_data): Add cast to unsigned to VARIANT of the define AARCH64_CORE. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> Diff: --- gcc/config/aarch64/driver-aarch64.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/driver-aarch64.cc b/gcc/config/aarch64/driver-aarch64.cc index 9d99554dbc28..0333746ee004 100644 --- a/gcc/config/aarch64/driver-aarch64.cc +++ b/gcc/config/aarch64/driver-aarch64.cc @@ -63,7 +63,7 @@ struct aarch64_core_data #define DEFAULT_CPU "generic-armv8-a" #define AARCH64_CORE(CORE_NAME, CORE_IDENT, SCHED, ARCH, FLAGS, COSTS, IMP, PART, VARIANT) \ - { CORE_NAME, #ARCH, IMP, PART, VARIANT, feature_deps::cpu_##CORE_IDENT }, + { CORE_NAME, #ARCH, IMP, PART, unsigned(VARIANT), feature_deps::cpu_##CORE_IDENT }, static CONSTEXPR const aarch64_core_data aarch64_cpu_data[] = {