[cfe-commits] patch: warn on allocating over-aligned objects

Nick Lewycky nlewycky at google.com
Fri Dec 16 22:10:02 PST 2011


On 16 December 2011 22:00, Chad Rosier <mcrosier at apple.com> wrote:

> On Dec 16, 2011, at 7:03 PM, Nick Lewycky wrote:
>
> > The attached patch warns on new expressions for types that are
> over-allocated, when the "operator new" that will be called is not
> overridden. Either the operator new in the class or in the global space can
> override, unless it's a global operator new from a system header. This
> addresses PR9527.
>
> Attachment?
>

Attachment!

Nick

> pr9527-2.cc:13:3: warning: type 'Test' requires 64 bytes of alignment and
> the
> >       default allocator only guarantees 16 bytes [-Woveraligned]
> >   new Test;
> >   ^
> >
> > Nick
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111216/76e898cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn-over-aligned-1.patch
Type: application/octet-stream
Size: 7084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111216/76e898cb/attachment.obj>


More information about the cfe-commits mailing list