Skip to content

Commit b396f98

Browse files
committed
fix: compilation error with newer clang-20
`hana` still uses spaces before literal operator, while clang enforces C++23 requirement In file included from ./evo/dmnstate.h:19: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/for_each.hpp:15: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/concept/foldable.hpp:19: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/fold_left.hpp:20: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/unpack.hpp:16: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/at.hpp:16: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/concept/iterable.hpp:20: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/drop_front.hpp:20: In file included from DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/integral_constant.hpp:13: DASH/depends/x86_64-pc-linux-gnu/include/boost/hana/bool.hpp:198:35: error: identifier '_c' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] 198 | constexpr auto operator"" _c() { | ~~~~~~~~~~~^~ | operator""_c
1 parent 2e6d8f2 commit b396f98

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

configure.ac

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,15 @@ if test "$enable_werror" = "yes"; then
453453
fi
454454
ERROR_CXXFLAGS=$CXXFLAG_WERROR
455455

456+
dnl -Wdeprecated-literal-operator cause problems with clang 20. Do not treat these warnings as errors.
457+
dnl TODO: remove it once we update hana
458+
AX_CHECK_COMPILE_FLAG([-Wdeprecated-literal-operator], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-error=deprecated-literal-operator"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
459+
#if !defined(__clang__) || defined(__INTEL_COMPILER)
460+
#error Non-clang compiler detected, not setting flag
461+
#endif
462+
int main(void) { return 0; }
463+
])])
464+
456465
dnl -Wattributes cause problems with some versions of GCC. Do not treat these warnings as errors.
457466
AX_CHECK_COMPILE_FLAG([-Wattributes], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-error=attributes"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
458467
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)

0 commit comments

Comments
 (0)