https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52231
--- Comment #7 from Nathan Froyd <froydnj at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #6) > (In reply to Nathan Froyd from comment #5) > > This also showed up in the context of trying to hint to the compiler that > > placement new didn't need null checks: > > That's only become true quite recently: > http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1748 Ah, thanks for the pointer. I assumed that the compiler would be able to infer that |&reference| would be non-null and eliminate the mandatory check regardless, but it's nice to have spec language to back this up. > See also PR 35878 Again, thanks for the pointer. If we can do this in the frontend now, that might be simple enough that I could take a look at it myself (assuming it hasn't been done and that PR simply didn't get referenced).