<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nice20</author_name>
  <author_url>https://blog.hatena.ne.jp/nice20/</author_url>
  <blog_title>LowPriority</blog_title>
  <blog_url>https://nice20.hatenadiary.org/</blog_url>
  <categories>
    <anon>unix</anon>
  </categories>
  <description>直接代入が使えるのは知ってたけど、保証されている動作なのか判って なかったので今まで使ってなかった。どうやらANSI CではOKと云うことらしい。 折角なので、どれだけ差が出るのか調べてみた。 サンプルコードは以下 struct addrinfo a1,a2; //memcpy経由 memcpy(&amp;a1,&amp;a2,sizeof(struct addrinfo)); //直接代入 a1 = a2; memcpy版のdisassemble出力 (gcc3.4.4 -O0) 0x080483c1 &lt;main+33&gt;: push $0x20 0x080483c3 &lt;main+35&gt;: lea 0xfff…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnice20.hatenadiary.org%2Fentry%2F20070726%2Fp1&quot; title=&quot; memcpyと構造体直接代入 - LowPriority&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-07-26 00:00:00</published>
  <title> memcpyと構造体直接代入</title>
  <type>rich</type>
  <url>https://nice20.hatenadiary.org/entry/20070726/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
