STINNER Victor added the comment: > Which compiler needs more than "abort();" in a default statement? gcc and > clang don't.
Again, I'm not sure that bpo-28152 is directly related to this issue, but here an example: $ git diff diff --git a/Parser/grammar.c b/Parser/grammar.c index 75fd5b9cde..2b7da68929 100644 --- a/Parser/grammar.c +++ b/Parser/grammar.c @@ -139,13 +139,6 @@ findlabel(labellist *ll, int type, const char *str) } fprintf(stderr, "Label %d/'%s' not found\n", type, str); Py_FatalError("grammar.c:findlabel()"); - - /* Py_FatalError() is declared with __attribute__((__noreturn__)). - GCC emits a warning without "return 0;" (compiler bug!), but Clang is - smarter and emits a warning on the return... */ -#ifndef __clang__ - return 0; /* Make gcc -Wall happy */ -#endif } /* Forward */ $ make Parser/grammar.c: In function '_Py_findlabel': Parser/grammar.c:142:1: warning: control reaches end of non-void function [-Wreturn-type] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31338> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com