[llvm-dev] GEP with a null pointer base

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 2 08:34:41 PDT 2017


>
>
> Saying “The C++ language lets me assume that that won’t happen, & optimize
> on that basis” is an assumption that that’s what the user wants, but you
> haven’t asked you’ve just assumed, and AFAICT it is an incorrect
> assumption.
>
This is actually an incorrect assumption on your part.  Many users have
been asked many many many times.  This wasn't just done.
So please don't say "you haven't asked you've just assumed", because that
is flat out wrong.

" and AFAICT it is an incorrect assumption."
This however, needs a citation to anything that is real data.

What’s worse is that there isn’t any way to opt-out of this assumption
> (-fsanitize=undefined isn’t opt’ing out, its opt’ing in to a lot extra
> that I
> might or might not want).
>

Correct, there is no way to opt-out except to use a different language (or
at the very least, a different compiler, but i'm not aware of any that
would meet your requirements in general).
Sometimes, you don't build something for every use case, and the answer is
"if that's your use case, that's awesome, but it's not a thing we serve".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170802/cca884c0/attachment.html>


More information about the llvm-dev mailing list