https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107958
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED See Also| |https://github.com/llvm/llv | |m-project/issues/28016 --- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Yes https://github.com/llvm/llvm-project/issues/28016 is the clang bug which shows GCC is correct. This is also https://www.open-std.org/JTC1/SC22/WG21/docs/cwg_closed.html#1228 . So clang is wrong in accepting the code as not ambiguous .