<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>higepon</author_name>
  <author_url>https://blog.hatena.ne.jp/higepon/</author_url>
  <blog_title>higepon blog</blog_title>
  <blog_url>https://higepon.hatenablog.com/</blog_url>
  <categories>
    <anon>C</anon>
    <anon>C++</anon>
  </categories>
  <description>某所で「処理系が末尾再帰最適化をしているかを、処理系で動くコードから判定できるか」的な話をふったところ C/C++ なら出来そうだよねと id:yaneurao さんからツッコミが。 やってみよう。 最適化されているなら is_tail_rec_opt_internal の引数である level は再帰しないのだから常に同じアドレスにいるはずだという予想の元に判定をしている。 int is_tail_rec_opt_internal(int level, int* p) { if (0 == level) { return &amp;level == p; } else { return is_tai…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhigepon.hatenablog.com%2Fentry%2F20070804%2F1186241590&quot; title=&quot; 末尾再帰最適化をC/C++上で検知してみたい - higepon blog&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-08-04 00:33:10</published>
  <title> 末尾再帰最適化をC/C++上で検知してみたい</title>
  <type>rich</type>
  <url>https://higepon.hatenablog.com/entry/20070804/1186241590</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
