01.06.17 09:36, Benjamin Peterson пише:
Modern GCC can defend against these kinds of problems. If I introduce a "goto fail" bug somewhere in Python, I get a nice warning: ../Objects/abstract.c: In function ‘PyObject_Type’: ../Objects/abstract.c:35:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (o == NULL) ^~ ../Objects/abstract.c:37:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ 2 + 3; ^This is not to say that simply bracing everything isn't the right way to go.
Actually a bug with misleadingly indented statement in CPython sources was fixed just few months ago (thanks to modern GCC).
_______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
