mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-19 04:12:09 +00:00
Disable the gcc 12 warning about dllimport in directory.hpp.
The warnings suppressed in header.hpp can be force-enabled by the user, so disable the buggy warning in directory.hpp instead. Also make the workaround more specific to MinGW.
This commit is contained in:
@@ -44,12 +44,6 @@
|
||||
// unused function 'foo'
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
||||
#if (__GNUC__ == 12)
|
||||
// 'function' redeclared without dllimport attribute: previous dllimport ignored
|
||||
// MinGW-w64 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
|
||||
#pragma GCC diagnostic ignored "-Wattributes"
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
// template argument uses unnamed type
|
||||
#pragma clang diagnostic ignored "-Wunnamed-type-template-args"
|
||||
|
||||
@@ -35,6 +35,13 @@
|
||||
|
||||
#include <boost/filesystem/detail/header.hpp> // must be the last #include
|
||||
|
||||
#if defined(__MINGW32__) && defined(BOOST_GCC) && (__GNUC__ == 12)
|
||||
#pragma GCC diagnostic push
|
||||
// 'function' redeclared without dllimport attribute: previous dllimport ignored
|
||||
// MinGW-w64 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
|
||||
#pragma GCC diagnostic ignored "-Wattributes"
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
@@ -1034,6 +1041,10 @@ struct range_const_iterator< boost::filesystem::recursive_directory_iterator, vo
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#if defined(__MINGW32__) && defined(BOOST_GCC) && (__GNUC__ == 12)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <boost/filesystem/detail/footer.hpp>
|
||||
|
||||
#endif // BOOST_FILESYSTEM_DIRECTORY_HPP
|
||||
|
||||
Reference in New Issue
Block a user