https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65786
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Undefined behaviour, for the reason Andrew gave. (People seem to like blaming new C++11 or C++14 features for their mistakes when using std::max incorrectly, Bug 61769 is another example.)