https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65472

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org
         Resolution|FIXED                       |DUPLICATE

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Ulya from comment #4)
> So GCC's intended behavior is not to warn about unreachable code?

No, but the previous implementation of Wunreachable-code was very broken and
nobody knew how to fix it, thus it was eventually removed. Since then (years
ago!), nobody has offered a new implementation, which perhaps shows that there
is actually little interest in this warning in practice. In the past, we got
more reports about Wunreachable-code bogus warnings than about missed ones.

Unfortunately, there are very few GCC developers working on the C/C++ FEs right
now and they are very busy with other more urgent things, like structural work
and updating to new standards. In addition, implementing this properly in the
FE would need some kind of control-flow graph, which GCC only has in the
middle-end.

BTW, I don't think it is useful to close these reports as INVALID, since they
are in essence requests for a new implementation of -Wunreachable-code. On the
other hand, it is not useful to have a PR for each possible testcase, since as
far as we know, there is no one even planning to work on this, unfortunately.

*** This bug has been marked as a duplicate of bug 46476 ***

Reply via email to