Skip to content

Commit 5a7e76d

Browse files
committed
Extend the dllimport workaround to any gcc 12.
At least, gcc on Cygwin also emits the same bogus warnings about missing dllimport attributes. Presumably, this may also be the case for visibility attributes, so just disable the warning universally on any gcc 12.
1 parent 1be9ea7 commit 5a7e76d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/filesystem/directory.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Copyright Jan Langer 2002
55
// Copyright Dietmar Kuehl 2001
66
// Copyright Vladimir Prus 2002
7-
// Copyright Andrey Semashev 2019, 2022
7+
// Copyright Andrey Semashev 2019-2025
88

99
// Distributed under the Boost Software License, Version 1.0.
1010
// See http://www.boost.org/LICENSE_1_0.txt
@@ -35,10 +35,10 @@
3535

3636
#include <boost/filesystem/detail/header.hpp> // must be the last #include
3737

38-
#if defined(__MINGW32__) && defined(BOOST_GCC) && (__GNUC__ == 12)
38+
#if defined(BOOST_GCC) && (__GNUC__ == 12)
3939
#pragma GCC diagnostic push
4040
// 'function' redeclared without dllimport attribute: previous dllimport ignored
41-
// MinGW-w64 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
41+
// gcc bug on MinGW-w64 and Cygwin: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
4242
#pragma GCC diagnostic ignored "-Wattributes"
4343
#endif
4444

@@ -1041,7 +1041,7 @@ struct range_const_iterator< boost::filesystem::recursive_directory_iterator, vo
10411041

10421042
} // namespace boost
10431043

1044-
#if defined(__MINGW32__) && defined(BOOST_GCC) && (__GNUC__ == 12)
1044+
#if defined(BOOST_GCC) && (__GNUC__ == 12)
10451045
#pragma GCC diagnostic pop
10461046
#endif
10471047

0 commit comments

Comments
 (0)