This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Avoid generating warnings for -O2 -Wunreachable-code


On Wed, Nov 04, 2009 at 01:37:50PM +0800, Eric Fisher wrote:
> This patch will avoid generating warnings for -O2 -Wunreachable-code,
> and has been tested on my machine. Also two test cases need be
> modified.

This doesn't look like a good idea, while you get rid of an unwanted
warning, you also make the code less debuggable.

> 2009-11-04  Eric Fisher  <joefoxreal@gmail.com>
> 
>         * gcc/tree-ssa-loop-ivcanon.c: Set the statement locations as
> UNKNOW_LOCATION to avoid generating warnings for -Wunreachable-code.
>         * gcc.dg/Wunreachable-2.c: Remove xfail from dg-bogus.
>         * gcc.dg/Wunreachable-8.c: Remove xfail from dg-bogus.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]