Skip to content

Commit 6de66a4

Browse files
Merge #6879: fix: compilation error with newer clang-20
b396f98 fix: compilation error with newer clang-20 (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented `hana` still uses spaces before literal operator, while newer 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 ## What was done? Adds `-Wno-error=deprecated-literal-operator` for clang ## How Has This Been Tested? Build locally successfully ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK b396f98 kwvg: utACK b396f98 Tree-SHA512: a30c0dbd113a64f13d48f448e15cca1271b5b33865ad2445ed49f4f65b1e47fd6d8ccdbdae30b1c43d2fcd01f1cceef8a89edc123cb447aa241055e5d2866289
2 parents ee484d6 + b396f98 commit 6de66a4

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)