You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Similar to #3014 I have the issue that i get a lot of warnings when compiling using gcc. I am not yet beyond the example with using this library, so i am kind of new here. I am compiling my file using gcc -O3 -Wall -shared -std=c++11 -fPIC $(python3-config --includes) -I "$PYBIND11_BASE/include" example.cpp -o "example$(python3-config --extension-suffix)"
This is how it is suggested in the docs, so i am unsure what i am doing wrong. (It was suggested here https://pybind11.readthedocs.io/en/stable/compiling.html#building-manually)
Getting warnings like:
/usr/include/c++/16/bits/stl_bvector.h:303:21: warning: ‘((const std::_Bit_iterator*)((char*)&used_kwargs + offsetof(pybind11::detail::small_vector<bool, 6>,pybind11::detail::small_vector<bool, 6>::m_repr) + 8))[1].std::_Bit_iterator::std::_Bit_iterator_base.std::_Bit_iterator_base::_M_offset’ may be used uninitialized [-Wmaybe-uninitialized]
303 | + __x._M_offset - __y._M_offset);
| ~~~~^~~~~~~~~
All of the warnings are -Wmaybe-uninitialized by the way. And they all come from stl_bvector.h
Other than that, it compiles just fine. Not sure if this is my fault or a bug.
I am on Linux (fedora 44) using the pybind11 release 3.0.4
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. Similar to #3014 I have the issue that i get a lot of warnings when compiling using gcc. I am not yet beyond the example with using this library, so i am kind of new here. I am compiling my file using
gcc -O3 -Wall -shared -std=c++11 -fPIC $(python3-config --includes) -I "$PYBIND11_BASE/include" example.cpp -o "example$(python3-config --extension-suffix)"This is how it is suggested in the docs, so i am unsure what i am doing wrong. (It was suggested here https://pybind11.readthedocs.io/en/stable/compiling.html#building-manually)
Getting warnings like:
All of the warnings are
-Wmaybe-uninitializedby the way. And they all come from stl_bvector.hOther than that, it compiles just fine. Not sure if this is my fault or a bug.
I am on Linux (fedora 44) using the pybind11 release 3.0.4
Beta Was this translation helpful? Give feedback.
All reactions