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 4, 2009 at 7:49 AM, Eric Fisher <joefoxreal@gmail.com> wrote:
> 2009/11/4 Jakub Jelinek <jakub@redhat.com>:
>> 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.
>
> Hmm. But these code is going to be removed after completely unrolling
> by cleanup_tree_cfg, so it has nothing to do with debugging.

-Wunreachable-code is seriously broken, I suggest to remove its
implementation completely.

Richard.


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