https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64329
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Michael Stahl from comment #1) > i believe i've hit the same problem I don't think so. The original bug report is for 4.9.3, and seems to be an actual compiler bug that is fixed already in GCC 5 and later. Your case is invalid code. While I agree a warning would be nice, it's not the same as a bug in 4.9.3 that has been fixed.