[llvm-bugs] [Bug 46016] New: std::to_chars generates exception code
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 21 05:26:27 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: mail at hanicka.net
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
`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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200521/d8684e8d/attachment.html>
More information about the llvm-bugs
mailing list