This is the mail archive of the gcc-bugs@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]

[Bug c++/46476] Missing Warning about unreachable code after return


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

--- Comment #7 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
Richard, perhaps a less aggressive -Wunreachable-code could be implemented just
after (or while) building the control flow graph?

It would not try to be smart with constant propagation or guessing branches
taken or not taken, just warn for code that immediately follows return, break,
continue, goto or throw. See PR69857.

Clang does have -Wunreachable-code.

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