[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 14 14:07:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-09-14 14:07:21 UTC ---
Wconversion does not warn either, but it also does not warn for:

enum Code {
  SUCCESS=-1
};

Code a;
void foo(void)
{
  unsigned int r;
  r = a;
}

Perhaps the code for handling this could be shared between Wconversion and
Wnarrowing (they warn in different cases but finding out these cases probably
requires similar code).



More information about the Gcc-bugs mailing list