[libcxx-commits] [PATCH] D101206: [libc++] Remove UB in std::list
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 24 07:05:23 PDT 2021
Quuxplusone added reviewers: ldionne, EricWF, Quuxplusone, Mordante.
Quuxplusone added a comment.
@Mordante: yes it does. :)
@akhuang: My understanding is that removing-the-UB is needed (or at least desired) for the benefit of some particular sanitizer; could you add info to the review summary (and commit message) about that?
Also, are we really interested in getting that benefit for C++03 code? Arguably it would be better to preserve the existing behavior for C++03 and fix the behavior only for C++>=11. Is it physically possible to go that route? and if so, does that eliminate a lot of the ifdefs in this PR? (I'm thinking we could just have one ifdef around the `union` itself, and then the rest of the code wouldn't need ifdefs at all.) The behavior would remain UB, but unchanged, in C++03; and we could say "if you want to use such-and-such sanitizer, please compile as C++>=11." That won't be a hardship for the user, will it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101206/new/
https://reviews.llvm.org/D101206
More information about the libcxx-commits
mailing list