New submission from Xavier de Gaye: Building Python with clang and ccache produces about 200 'parentheses-equality' warnings with the message: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
It seems that clang does not recognize that these extraneous parentheses are valid [1] after a macro expansion because the preprocessing is done as a separate stage by ccache. [1] For example: With the macros: #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define PyLong_CheckExact(op) (Py_TYPE(op) == &PyLong_Type) The statement: if (PyLong_CheckExact(v)) is expanded to: if (((((PyObject*)(v))->ob_type) == &PyLong_Type)) and produces the warning with ccache. ---------- components: Devguide files: clang_ccache.patch keywords: patch messages: 267881 nosy: eric.araujo, ezio.melotti, ncoghlan, willingc, xdegaye priority: normal severity: normal stage: patch review status: open title: 'parentheses-equality' warnings when building with clang and ccache type: enhancement Added file: http://bugs.python.org/file43309/clang_ccache.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27270> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com