http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60114
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Chengnian Sun from comment #2) > It seems -pedantic and -Woverflow are different. When I issue > $ gcc-trunk -c -Woverflow s.c > then there is no overflow warning. (There is indeed no overflow.) > > But when I use > $ gcc-trunk -c -pedantic s.c > the warning says that it is emitted from -Woverflow. Is this expected? There are some warnings that are only enabled if -Wpedantic is given in combination with other flag. Unfortunately, there is currently no way to say that a warning is enabled by the combination of two flags, short of creating a new flag -Wpedantic-overflow, which is enabled by the combination of -Wpedantic && -Woverflow. I think it could be a nice workaround