http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-26 11:46:46 UTC --- That narrowing warning seems right to me, the enum variable could have a value out of range of short: Code a = static_cast<Code>(SHRT_MAX+1);