Commit 949dfeb1 authored by Kevin Modzelewski's avatar Kevin Modzelewski

-Werror=implicit-function-declaration

Amazingly, cffi compiled just fine with some missing function
declarations.  It provided implicit definitions for them and
then casted the "int" return type up to a PyObject*.
parent 49fe0ddf
......@@ -312,13 +312,13 @@ extern PyGC_Head *_PyGC_generation0;
(PyObject_IS_GC(obj) && \
(!PyTuple_CheckExact(obj) || _PyObject_GC_IS_TRACKED(obj)))
#endif
PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t) PYSTON_NOEXCEPT;
PyAPI_FUNC(PyObject *) _PyObject_GC_New(PyTypeObject *) PYSTON_NOEXCEPT;
PyAPI_FUNC(PyVarObject *) _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyObject_GC_Track(void *) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyObject_GC_UnTrack(void *) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyObject_GC_Del(void *) PYSTON_NOEXCEPT;
#endif
#define PyType_IS_GC(t) ((t),1)
#define _PyObject_GC_TRACK(o) ((void)(o))
#define _PyObject_GC_UNTRACK(o) ((void)(o))
......
......@@ -371,6 +371,7 @@ class CCompiler:
cc_args[:0] = ['-g']
if before:
cc_args[:0] = before
cc_args = cc_args + ["-Werror=implicit-function-declaration"]
return cc_args
def _fix_compile_args(self, output_dir, macros, include_dirs):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment