boostorg / stacktrace

C++ library for storing and printing backtraces.
https://boost.org/libs/stacktrace
424 stars 71 forks source link

warning: ISO C++ prohibits anonymous structs #58

Closed kivadiu closed 6 years ago

kivadiu commented 6 years ago

While building 1.68.0 beta 1 on x86_64 linux cross-compiling to Windows 64 bits with minw-w64 + g++ 8.2.0, I get this warning:

"x86_64-w64-mingw32-g++-8.2.0"   -I/softs/win64-mingw-8.2.0/release/iconv/include -I/softs/win64-mingw-8.2.0/release/gettext/include -I/softs/win64-mingw-8.2.0/release/bzip2/include -I/softs/win64-mingw-8.2.0/release/zlib/include -I/softs/win64-mingw-8.2.0/release/jpeg-turbo/include -I/softs/win64-mingw-8.2.0/release/xz/include -I/softs/win64-mingw-8.2.0/release/tiff/include -I/softs/win64-mingw-8.2.0/release/png/include -std=c++14 -O2 -DNDEBUG -m64 -mthreads -O3 -finline-functions -Wno-inline -Wall -pedantic  -DBOOST_ALL_NO_LIB=1 -DBOOST_ASIO_NO_DEPRECATED -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_LOG_WITHOUT_EVENT_LOG -DNDEBUG  -I"." -c -o "bin.v2/libs/stacktrace/build/gcc-8.2.0/release/link-static/target-os-windows/threading-multi/basic.o" "libs/stacktrace/build/../src/basic.cpp"
In file included from ./boost/winapi/file_management.hpp:17,
                 from ./boost/stacktrace/detail/safe_dump_win.ipp:20,
                 from ./boost/stacktrace/safe_dump_to.hpp:210,
                 from ./boost/stacktrace/frame.hpp:20,
                 from ./boost/stacktrace/detail/frame_unwind.ipp:15,
                 from libs/stacktrace/build/../src/basic.cpp:14:
./boost/winapi/overlapped.hpp:38:9: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
         };
         ^
apolukhin commented 6 years ago

@Lastique looks like this issue belongs to Boost.WinAPI My guess is that _OVERLAPPED requires two BOOST_WINAPI_DETAIL_EXTENSION

Lastique commented 6 years ago

See if https://github.com/boostorg/winapi/commit/fee1bec7f97c24d082ea0b1300aba83c3899484e fixes the problem.

kivadiu commented 6 years ago

Yes boostorg/winapi@fee1bec fixes the issue. Thanks

apolukhin commented 6 years ago

@kivadiu many thanks for reporting the issue! @Lastique even more thanks for the fix!