http://llvm.org/bugs/show_bug.cgi?id=20876
Nico Weber <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #5 from Nico Weber <[email protected]> --- #include <stdio.h> #include <string.h> struct ANSI_STRING { unsigned short len; unsigned short maxlen; char* buf; }; int main() { char buf[] = "hello there"; ANSI_STRING s = { strlen(buf), sizeof(buf), buf }; printf("%4.4Z\n", &s); printf("%4.4s\n", s.buf); } has output D:\src\chromefetch\src>test hello there hell So precision is in fact ignored for %Z arguments. So clang's right here, and chromium's code is incorrect. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
