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
D:\dev\tmp\pybindmingw>C:\tools\mingw-w64\bin\g++.exe -ID:\\.conan\data\pybind11\2.13.1\_\_\package\5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9\include -isystem D://.conan/data/dyna4-python-embedded/3.9.19.20240423/pnd28/testing/package/a57cdd79732bacf1f842fc7d97f3485af7cbc563/include -isystem D://.conan/data/eigen/3.3.8/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/eigen3 -Wall -O2 -c .\mysource.cpp
In file included from D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/pybind11.h:17:0,
from D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/numpy.h:12,
from D:\\.conan\data\pybind11\2.13.1\_\_\package\5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9\include/pybind11/eigen/matrix.h:12,
from D:\\.conan\data\pybind11\2.13.1\_\_\package\5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9\include/pybind11/eigen.h:12,
from .\mysource.cpp:3:
D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/gil_safe_call_once.h: In instantiation of 'T& pybind11::gil_safe_call_once_and_store<T>::get_stored() [with T = pybind11::detail::npy_api]':
D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/numpy.h:272:70: required from here
D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/gil_safe_call_once.h:75:16: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return *reinterpret_cast<T *>(storage_);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/gil_safe_call_once.h: In instantiation of 'T& pybind11::gil_safe_call_once_and_store<T>::get_stored() [with T = pybind11::object]':
D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/numpy.h:771:25: required from here
D://.conan/data/pybind11/2.13.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/pybind11/gil_safe_call_once.h:75:16: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
$ C:\tools\mingw-w64\bin\g++.exe --version
g++ (x86_64-posix-seh-rev2, Built by MinGW-W64 project) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.13.1
Problem description
Compiling code that uses
pybind11/eigen.h
on MinGW 6.3.0 fails with the following error:I noticed that in
gil_safe_call_once.h
, there already is a conditional suppression of this warning, but it seems that MinGW is not yet covered by it.pybind11/include/pybind11/gil_safe_call_once.h
Lines 70 to 75 in 50acb81
Relevant compiler log output:
Related to #4877
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression
The text was updated successfully, but these errors were encountered: