https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108217
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- clang does not warn even at all. That being said there is a missed optimization but that is the same as PR 23384 . The const part is a misleading you really. *** This bug has been marked as a duplicate of bug 23384 ***