On Feb 24, 2011, at 4:11 PM, Eli Friedman wrote:

> On Thu, Feb 24, 2011 at 3:03 PM, Ted Kremenek <[email protected]> wrote:
>> Author: kremenek
>> Date: Thu Feb 24 17:03:04 2011
>> New Revision: 126447
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=126447&view=rev
>> Log:
>> Don't warn about using PredefinedExprs as format string literals.  These 
>> never can be a real security issue.
> 
> #include <cstdio>
> const int a=0, d=1;
> void f(__typeof(a%d)) { printf(__PRETTY_FUNCTION__); puts(""); }
> int main() { f(0); return 0; }
> 
> Generated output:
> void f(typeof (a -1465849624))

Ok, it's possible (and very clever).  I don't think it's sufficiently worth 
worrying about though :)

-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to