{"provider_name":"Hatena Blog","blog_title":"\u4e03\u8a8c\u306e\u958b\u767a\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/n7shi/","height":"190","published":"2012-06-11 00:30:34","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2F7shi.hateblo.jp%2Fentry%2F2012%2F06%2F11%2F003034\" title=\"void*\u3068\u30aa\u30d5\u30bb\u30c3\u30c8 - \u4e03\u8a8c\u306e\u958b\u767a\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>","width":"100%","provider_url":"https://hatena.blog","type":"rich","title":"void*\u3068\u30aa\u30d5\u30bb\u30c3\u30c8","categories":["C++"],"url":"https://7shi.hateblo.jp/entry/2012/06/11/003034","author_name":"n7shi","description":"\u7b2c6\u56de \u30b3\u30f3\u30d1\u30a4\u30e9\u5b9f\u88c5\u4f1a\u3067\u51fa\u305f\u8a71\u984c\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u304c\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u306a\u305c\uff1f test.cpp #include <stdlib.h> int main(void) { void *p = malloc(100); *(void **)&p[10] = reinterpret_cast<void *>(free); return 0; } \u30b3\u30f3\u30d1\u30a4\u30eb\u7d50\u679c $ g++ test.cpp test.cpp: In function 'int main()': test.cpp:5:20: warning: pointer of type 'void *' used in arithmetic [\u2026","blog_url":"https://7shi.hateblo.jp/","image_url":null}