Hi! While we ignore -Wunreachable-code option now, as we require that GCC diagnostic options are CL_WARNING only, we should remember that this is a former Warning option (similarly for -Werror=).
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-02-22 Jakub Jelinek <ja...@redhat.com> PR c/69900 * common.opt (Wunreachable-code): Add Warning flag. * gcc.dg/pr69900.c: New test. --- gcc/common.opt.jj 2016-02-16 21:43:38.000000000 +0100 +++ gcc/common.opt 2016-02-22 12:16:53.393949080 +0100 @@ -728,7 +728,7 @@ Common Var(warn_maybe_uninitialized) War Warn about maybe uninitialized automatic variables. Wunreachable-code -Common Ignore +Common Ignore Warning Does nothing. Preserved for backward compatibility. Wunused --- gcc/testsuite/gcc.dg/pr69900.c.jj 2016-02-22 12:29:22.177681519 +0100 +++ gcc/testsuite/gcc.dg/pr69900.c 2016-02-22 12:29:09.000000000 +0100 @@ -0,0 +1,6 @@ +/* PR c/69900 */ +/* { dg-do compile } */ + +#pragma GCC diagnostic error "-Wunreachable-code" /* { dg-bogus "is not an option that controls warnings" } */ +#pragma GCC diagnostic warning "-Wunreachable-code" /* { dg-bogus "is not an option that controls warnings" } */ +#pragma GCC diagnostic ignored "-Wunreachable-code" /* { dg-bogus "is not an option that controls warnings" } */ Jakub