You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
[proposal] Freeze __ARM_ARCH macro up until Armv8.x-A #304
LLVM and gcc have an older definition of this macro, thus they don't currently follow the ACLE.
Starting from Armv9-a, numerical comparisons break. For instance, 805 (Armv8-5.a) is greater than 9 (Armv9-a).
Action: freeze the macro definition up until Armv8.x-A. Thus it must not be used from Armv9-A onwards. The ACLE spec must be updated to inform so.
However, the ACLE specification must inform users not to use or rely on this macro to control architecture features usage. They must use specific feature macros instead.
We cannot safely write things like __ARM_ARCH >= 9 because that will misfire in compilers that implement the X * 100 + Y convention. But we also cannot rely on X * 100 + Y because no one implements it. (We would rather use __ARM_FEATURE_* anyway, but you all are missing stuff. See #475.)
Activity
[-]Freeze __ARM_ARCH macro up until Armv8.x-A[/-][+][proposal] Freeze __ARM_ARCH macro up until Armv8.x-A[/+]davidben commentedon Nov 2, 2026
Bumping this. We ran into this in BoringSSL. CC @dingxiangfei2009
We cannot safely write things like
__ARM_ARCH >= 9because that will misfire in compilers that implement theX * 100 + Yconvention. But we also cannot rely onX * 100 + Ybecause no one implements it. (We would rather use__ARM_FEATURE_*anyway, but you all are missing stuff. See #475.)I see in llvm/llvm-project#49015 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99312, both compilers rejected doing this and someone (Arm?) said this was being deprecated. But it has not actually been deprecated.
Was the X * 100 + Y convention ever implemented anywhere? Can Arm do something about this mess please?