]> git.ipfire.org Git - thirdparty/gcc.git/commit
loongarch: LoongArch backend, meet C++20
authorJakub Jelinek <jakub@redhat.com>
Fri, 28 Nov 2025 21:04:57 +0000 (22:04 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 28 Nov 2025 21:04:57 +0000 (22:04 +0100)
commite7de6ffc2dad50e99452127fc3875e248fa01766
treed7f86deac6338a8dd70054f02af692914f472c14
parent1121d2cc8e4b06523773a4d8f49f38d9c75aaa53
loongarch: LoongArch backend, meet C++20

C++20, in particular https://wg21.link/P1120R0 paper voted into it,
deprecates various operations between enumerators from different enumeration
types etc., and as we've switched to -std=gnu++20 by default, this now
results in warnings or errors during stage2 and onwards.

The following patch should fix loongarch build.

2025-11-28  Jakub Jelinek  <jakub@redhat.com>

* config/loongarch/loongarch.cc (loongarch_unspec_address_offset):
Avoid arithmetics between enumerators from different enum types.
(loongarch_call_tls_get_addr): Likewise.
gcc/config/loongarch/loongarch.cc