[cfe-dev] Option to disable POD check for variadic functions

Sebastian Redl sebastian.redl at getdesigned.at
Thu May 19 22:58:39 PDT 2011


On 19.05.2011, at 22:36, Douglas Gregor wrote:

> 
> On May 19, 2011, at 3:15 PM, Tomasz Dabrowski wrote:
> 
>> Hello,
>> 
>> is it possible to disable POD check for variadic functions? For example:
>> 
>> error: cannot pass object of non-POD type 'string' through variadic
>> function; call will abort at runtime [-Wnon-pod-varargs]
>> for:
>> struct string { const char * str; string() {}; };
>> string s;
>> printf("%s", s);
> 
> 
> It makes sense to model the semantics properly for C++0x; I don't see any specific reason to disable this check.

Francois might want to - I think MFC"s CString was modeled carefully so that passing it to printf would do the right thing, and I suspect there's quite a bit of code relying on this out there.

Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110519/6d6965af/attachment.html>


More information about the cfe-dev mailing list