Compare commits

...

3 Commits

Author SHA1 Message Date
sahvx655-wq
208a9c4cee
Merge 82882b237d0af7c5dfd940b9eeeac2c2c351dc66 into 30868f8734947deeb80cf508c290eae24f3cf261 2026-06-11 19:29:06 +05:30
Daniel Lemire
30868f8734
Merge pull request #392 from biojppm/fix/gcc9_compile_error
Fix compile error with gcc 9: use of [[unlikely]]
2026-06-11 09:37:38 -04:00
Joao Paulo Magalhaes
8e6edc8ad2
Fix compile error with gcc 9: use of [[unlikely]] 2026-06-10 15:37:26 +01:00

View File

@ -207,7 +207,11 @@ using parse_options = parse_options_t<char>;
// to a no-op elsewhere (e.g. pre-C++20 MSVC, which has no equivalent hint).
#ifdef __has_cpp_attribute
#if __has_cpp_attribute(unlikely) >= 201803L
#define FASTFLOAT_USE_UNLIKELY_ATTR 1
// g++-9 hits hits this branch, but then fails to compile
// [[unlikely]]. This happens only with g++-9.
#if !defined(__GNUC__) || (__GNUC__ != 9)
#define FASTFLOAT_USE_UNLIKELY_ATTR
#endif
#endif
#endif