diff --git a/include/nanobind/stl/detail/chrono.h b/include/nanobind/stl/detail/chrono.h index 39bd5d91..b4815c57 100644 --- a/include/nanobind/stl/detail/chrono.h +++ b/include/nanobind/stl/detail/chrono.h @@ -19,7 +19,13 @@ // in order to be able to handle errors better. #if !defined(Py_LIMITED_API) && !defined(PYPY_VERSION) -#include +# include +#endif + +#if defined(__GNUC__) +// warning: warning: declaration of '...' with attribute 'noinline' follows inline declaration +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" #endif NAMESPACE_BEGIN(NB_NAMESPACE) @@ -287,3 +293,7 @@ inline PyObject* pack_datetime(int year, int month, int day, } #endif // !defined(Py_LIMITED_API) && !defined(PYPY_VERSION) +// +#if defined(__GNUC__) +# pragma GCC diagnostic pop +#endif diff --git a/src/nb_func.cpp b/src/nb_func.cpp index 15ad101f..972c3960 100644 --- a/src/nb_func.cpp +++ b/src/nb_func.cpp @@ -1341,7 +1341,7 @@ PyObject *nb_func_get_doc(PyObject *self, void *) { const func_data *fi = f + i; nb_func_render_signature(fi); buf.put('\n'); - doc_found |= fi->flags & (uint32_t) func_flags::has_doc; + doc_found |= (fi->flags & (uint32_t) func_flags::has_doc) != 0; } if (doc_found) {