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

Chad Rosier mcrosier at apple.com
Fri Dec 16 22:00:56 PST 2011


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?

> 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




More information about the cfe-commits mailing list