[llvm-bugs] [Bug 48463] New: [MSVC compat] Null checks for non-noexcept allocation functions
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Dec 9 11:11:36 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48463
Bug ID: 48463
Summary: [MSVC compat] Null checks for non-noexcept allocation
functions
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dmajor at mozilla.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
https://godbolt.org/z/h955c9
In the example above, clang tests the result of an allocation for null iff the
allocation function is marked noexcept. This makes sense, and agrees with my
reading of https://eel.is/c++draft/expr.new#20, but MSVC includes the null
check regardless of the exception specification. Should clang do the same when
targeting Windows?
(This was reduced from a real-world crash that occurred because the code put
the noexcept behind an #ifndef _MSC_VER, probably due to lack of support at the
time.)
--
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/20201209/41142f07/attachment.html>
More information about the llvm-bugs
mailing list