https://bugs.llvm.org/show_bug.cgi?id=46016

            Bug ID: 46016
           Summary: std::to_chars generates exception code
           Product: libc++
           Version: 10.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

`std::to_chars` is generating exception handling code, because internals
functions are not marked `noexcept` and clang can't proof they won't throw:

```
namespace __itoa {
_LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer);
_LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer);
}
```

if you add `noexcept` there it will generate more efficient code:

https://compiler-explorer.com/z/H29awf

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to