http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55422
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-11-21 12:44:31 UTC --- Looks like the first example is just an undefined behavior in which case GCC isn't obliged to issue an error.