[Bug bootstrap/122151] [16 Regression] analyzer fails to build with g++ 5.5
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 8 16:31:18 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122151
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You're relying on a feature implemented in r7-4488-gba1e69c03f96f8 which added
support for https://wg21.link/cwg374 (PR c++/56480).
Technically that change should be supported by a C++11 compiler, but GCC didn't
implement it until 7.1
The workaround is simple, just define these specializations of
json::enum_traits members in namespace json, instead of qualifying them as
json::enum_traits:
https://gcc.gnu.org/cgit/gcc/tree/gcc/custom-sarif-properties/state-graphs.cc?id=e4ab1f87805a6555bc327538d67067f3a690eddc#n75
i.e.
namespace json
{
template<>
enum node::kind
enum_traits<enum node::kind>::get_unknown_value ()
{
return node::kind::other;
}
}
More information about the Gcc-bugs
mailing list