hans added a comment.

What's special about size_t though? If I understand your patch correctly, it 
would suppress warning about printing NSInteger with %zd, but still warn about 
%ld even though ssize_t=long on the target? As a user I'd find this confusing.

If we really want to special-case NSInteger, and given that you're targeting a 
specific wide-spread pattern maybe that's the right thing to do, I think we 
should make -Wformat accept (move the warning behind -Wformat-pedantic I 
suppose) printing NSInteger with *any* integral type of the right size, not 
just size_t.

Also, I haven't looked at what happens on the scanf side. Does that need an 
equivalent change?


Repository:
  rC Clang

https://reviews.llvm.org/D47290



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to