https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87857
--- Comment #3 from Stas Sergeev <stsp at users dot sourceforge.net> --- So a clang bug? I wonder if ubsan is supposed to produce the compile-time errors, rather than the run-time warnings. Would it be possible to downgrade this to a compile-time warning, and/or add a switch to disable it? IMHO its absolutely unexpected to get the compilation failure just because of ubsan.