-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmt::vformat() throws an exception on Clang in x86 mode during chrono formatting. #4244
Comments
The error is expected: 19 Jan 3001 is not representable as 32-bit |
@vitaut Ok then, how the |
I am not sure how they avoid conversion to |
@vitaut Ok, could you at least reopen the issue, so it is known that some work can be done here. |
Sure, we can keep it open in case anyone is interested in investigating this further. |
Thanks, I've updated the title and description a bit, because it it seems to be a generic issue with Clang in x86 targeting mode. |
Hello,
I believe I've discovered a bug in latest version of
fmt
when compiled using Clang in x86 targeting mode. We have a legacy codebase with some Time functions wrappers which we try to refactor by using more modern tooling. We usefmt
as polyfill for platforms which still don't have proper std:;format() support.The current issue is reproducible only on our Clang x86 targeting pipeline, on all other mobile and desktop platforms the code works as expected. The exception being thrown is
fmt::v11::format_error
. I've managed to strip down the code to a small reproducible example. Here's the CompilerExplorer link: https://godbolt.org/z/v1Mezdd8TThe moment you remove the
-m32
flag the program executes successfully.EDIT: Switching from
fmt
tostd
works on the same compiler with same flags: https://godbolt.org/z/v8EnYzaWqThe text was updated successfully, but these errors were encountered: