building gdb 15 with clang 20 produces the following error: ./../gdbsupport/enum-flags.h:97:34: error: non-type template argument is not a constant expression 97 | integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./../gdbsupport/enum-flags.h:134:20: note: in instantiation of template class 'enum_underlying_type<ui_out_flag>' requested here 134 | typedef typename enum_underlying_type<enum_type>::type underlying_type; | ^ ././ui-out.h:385:16: note: in instantiation of template class 'enum_flags<ui_out_flag>' requested here 385 | ui_out_flags m_flags; | ^ ./../gdbsupport/enum-flags.h:97:52: note: integer value -1 is outside the valid range of values [0, 15] for the enumeration type 'ui_out_flag' 97 | integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type | ^ ./../gdbsupport/enum-flags.h:97:34: error: non-type template argument is not a constant expression 97 | integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./../gdbsupport/enum-flags.h:134:20: note: in instantiation of template class 'enum_underlying_type<domain_search_flag>' requested here 134 | typedef typename enum_underlying_type<enum_type>::type underlying_type; | ^ ./symtab.h:920:31: note: in instantiation of template class 'enum_flags<domain_search_flag>' requested here 920 | constexpr domain_search_flags SEARCH_ALL_DOMAINS | ^ ./../gdbsupport/enum-flags.h:97:52: note: integer value -1 is outside the valid range of values [0, 255] for the enumeration type 'domain_search_flag' 97 | integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type | ^ this is because gdb is attempting to instantiate an unsigned enum from a signed, negative value, which is UB. Clang previously tolerated this in constexpr contexts (and gdb just silenced the warning with a pragma), but as of clang++20 this appears to be enforced. fixed upstream in https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a0b2cb7210c65c8c9f4a56345749bb7294fbfbf If I'm seeing correctly, the fix also made it into gdb 16