Skip to content

Fix compile error with gcc 9: use of [[unlikely]]#392

Open
biojppm wants to merge 1 commit into
fastfloat:mainfrom
biojppm:fix/gcc9_compile_error
Open

Fix compile error with gcc 9: use of [[unlikely]]#392
biojppm wants to merge 1 commit into
fastfloat:mainfrom
biojppm:fix/gcc9_compile_error

Conversation

@biojppm

@biojppm biojppm commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

gcc 9 (and only 9) advertises availability of [[unlikely]] but then fails to compile it. Fixed by selectively disabling on gcc 9. With this change, now fast_float compiles in all existing gcc and clang versions.

Also, removed the value of 1 from #define FAST_FLOAT_USE_UNLIKELY_ATTR 1, to avoid erroneous hint to subsequent use of #if instead of #ifdef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant