On Mon, Jul 31, 2023 at 8:18 PM Julian Waters via Gcc <gcc@gcc.gnu.org> wrote: > > Please review a patch to add clang's invalid-noreturn flag to toggle > noreturn warnings. This patch keeps the old behaviour of always warning on > every noreturn violation, but unlike clang also adds an extra layer of fine > tuning by turning invalid-noreturn into a warning with levels, where level > 1 warns about noreturn functions that do return, level 2 warns about > noreturn functions that explicitly have return statements, and level 3, > which is the default to match old behaviour, warns for both instances. I am > under the impression that behaviour changing patches should be sent to this > list rather than gcc-patches, please do correct me if I am mistaken
No all patches just goto gcc-patches@. I see you didn't add any documentation to doc/invoke.texi at all. Also you missed a changelog. You are also missing a few testcases for this change. Also did you test your patch and for what target? Please read https://gcc.gnu.org/contribute.html for guidelines on submitting a patch which should help you there. https://gcc.gnu.org/onlinedocs/gccint/Testsuites.html and https://gcc.gnu.org/wiki/HowToPrepareATestcase should help on how to write the testcases. Thanks, Andrew Pinski > > gcc/c-family/c.opt | 8 ++++++++ > gcc/c/c-typeck.cc | 9 ++++++--- > gcc/c/gimple-parser.cc | 9 ++++++--- > gcc/cp/coroutines.cc | 11 +++++++---- > gcc/cp/typeck.cc | 7 +++++-- > gcc/tree-cfg.cc | 5 ++++- > 6 files changed, 36 insertions(+), 13 deletions(-)