On Tue, Sep 13, 2016 at 12:51:52PM -0700, Richard Smith wrote: > On Tue, Sep 13, 2016 at 10:44 AM, Joerg Sonnenberger via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > IMO this should be restricted to code that explicitly disables C/C++ > > aliasing rules. > > > Do you mean -fno-strict-aliasing or -fno-struct-path-tbaa or something else > here? (I think we're not doing anyone any favours by making _FORTIFY_SOURCE > say that a pattern is OK in cases when LLVM will in fact optimize on the > assumption that it's UB, but I don't recall how aggressive > -fstruct-path-tbaa is for trailing array members.)
The former immediately, the latter potentially as well. I can't think of many use cases for this kind of idiom that don't involve type prunning and socket code is notoriously bad in that regard by necessity. Joerg _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits