aaron.ballman added inline comments.

================
Comment at: clang/docs/ReleaseNotes.rst:63
 
+* As per C++ and C Standards (C++: ``[expr.add]``; C17: 6.5.6p8), applying
+  non-zero offset to ``nullptr`` (or making non-``nullptr`` a ``nullptr``,
----------------
rsmith wrote:
> In C, even adding 0 to a null pointer is undefined. Did this change in C17?
I don't see what words in the C standard make this UB. If it's UB-by-omission, 
I think it's unintentional. I mean, this language allows `&*some_null_pointer` 
without UB, so I would be really surprised if `some_null_ptr + 0` was UB. Do 
you have a source in the C standard for the UB?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67122/new/

https://reviews.llvm.org/D67122



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to