We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Compiling
#include <fmt/core.h> int main() { fmt::print("The answer is {}.", 42); }
with gcc 7.3 (https://godbolt.org/g/UH8T39) gives
.LC0: .string "The answer is {}." main: sub rsp, 56 mov edx, 2 mov edi, OFFSET FLAT:.LC0 mov DWORD PTR [rsp+32], 42 lea rcx, [rsp+32] mov esi, 17 movdqa xmm0, XMMWORD PTR [rsp+32] movaps XMMWORD PTR [rsp], xmm0 mov DWORD PTR [rsp], 42 movdqa xmm0, XMMWORD PTR [rsp] movaps XMMWORD PTR [rsp+32], xmm0 call fmt::vprint(fmt::basic_string_view<char>, fmt::basic_format_args<fmt::basic_context<std::back_insert_iterator<fmt::internal::basic_buffer<char> >, char> >) xor eax, eax add rsp, 56 ret
compared to clang 4.0.1:
main: # @main sub rsp, 24 mov qword ptr [rsp], 42 mov rcx, rsp mov edi, .L.str mov esi, 17 mov edx, 2 call fmt::vprint(fmt::basic_string_view<char>, fmt::basic_format_args<fmt::basic_context<std::back_insert_iterator<fmt::internal::basic_buffer<char> >, char> >) xor eax, eax add rsp, 24 ret .L.str: .asciz "The answer is {}."
The text was updated successfully, but these errors were encountered:
GCC trunk generates the same code as clang: https://godbolt.org/g/NoUbTh, but it's probably worth implementing a workaround anyway.
Sorry, something went wrong.
Workaround missed optimization in gcc (#668)
a103b9b
No branches or pull requests
Compiling
with gcc 7.3 (https://godbolt.org/g/UH8T39) gives
compared to clang 4.0.1:
The text was updated successfully, but these errors were encountered: