{"type":"rich","version":"1.0","provider_url":"https://hatena.blog","height":"190","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20120215%2Fp1\" title=\"printf\u3068size_t\u578b - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"printf\u3068size_t\u578b","blog_url":"https://yohhoy.hatenadiary.jp/","published":"2012-02-15 00:00:00","blog_title":"yohhoy\u306e\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/yohhoy/","description":"C99\u306b\u3066size_t\u578b\u7528\u306e\u66f8\u5f0f\u5316\u6587\u5b57\u5217 \u9577\u3055\u4fee\u98fe\u5b50(length modifier)z\u304c\u8ffd\u52a0\u3055\u308c\u305f\u3002 #include <stdio.h> printf(\"%zu\\n\", sizeof(int)); \u306a\u304a\u3001\u540c\u6642\u306bptrdiff_t\u578b\u7528\u306e\u9577\u3055\u4fee\u98fe\u5b50t\u3082\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u3002 gcc\u7cfb gcc(glibc 2.1\u4ee5\u964d)\u306fz\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u3002\u305f\u3060\u3057\u3001\u53b3\u5bc6\u306aC90\uff08-pedantic\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\uff09\u3068\u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u5834\u5408\u306f\u4e0b\u8a18\u8b66\u544a\u304c\u51fa\u529b\u3055\u308c\u308b*1\u3002 warning: ISO C90 does not support the 'z' gnu_printf length modifier VisualC++\u7cfb\u2026","width":"100%","categories":["C","gcc","MSVC"],"url":"https://yohhoy.hatenadiary.jp/entry/20120215/p1","author_name":"yohhoy","image_url":null}