<div dir="ltr">Thats an excellent point about the fact that the ABI does evolve over time.  You&#39;ve convinced me on the use of the yyyymmdd instead of the boolean for the values.<div><br></div><div>As to your point of how the language runtime/ABI library would be influenced by this is exactly the motivation for this!<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 7, 2017 at 12:32 PM, Ed Smith-Rowland <span dir="ltr">&lt;<a href="mailto:3dw4rd@verizon.net" target="_blank">3dw4rd@verizon.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <div class="m_6789004838522064702moz-cite-prefix">On 01/06/2017 08:45 PM, Saleem
      Abdulrasool wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5"><span style="color:rgb(49,49,49);word-spacing:1px;background-color:rgb(255,255,255)">Hi,</span>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px"><br class="m_6789004838522064702gmail_msg">
      </div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">I was wondering if
        it would be possible to add a macro to identify the underlying
        ABI that the C++ runtime is using?  Although itanium is the more
        popular choice, there are alternative ABIs such as the one which
        Microsoft uses.  I would propose something like the following:</div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px"><br class="m_6789004838522064702gmail_msg">
      </div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">__cpp_abi_itanium</div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">__cpp_abi_microsoft</div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px"><br class="m_6789004838522064702gmail_msg">
      </div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">They would be
        defined to 1 based on which is being used.  This would allow the
        implementation to change the behavior based on the ABI being
        used.</div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px"><br class="m_6789004838522064702gmail_msg">
      </div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">Thanks!</div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px"><br>
      </div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">-- </div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">Saleem Abdulrasool</div>
      <div class="m_6789004838522064702gmail_msg" style="color:rgb(49,49,49);word-spacing:1px">compnerd (at)
        compnerd (dot) org</div>
      <br>
      <fieldset class="m_6789004838522064702mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><span class=""><pre>______________________________<wbr>_________________
Features mailing list
<a class="m_6789004838522064702moz-txt-link-abbreviated" href="mailto:Features@isocpp.open-std.org" target="_blank">Features@isocpp.open-std.org</a>
<a class="m_6789004838522064702moz-txt-link-freetext" href="http://www.open-std.org/mailman/listinfo/features" target="_blank">http://www.open-std.org/<wbr>mailman/listinfo/features</a>
</pre>
    </span></blockquote>
    <p>This is an interesting idea.  ABI is not really a language
      problem so the idea might not catch here. ^H...^H.  Actually,
      every time a language feature is added the ABIs have to add it.<br>
    </p>
    <p>On the other hand portability ideas have been floated before and
      were found illuminating (There was a paper about standardizing an
      ABI and.. Hinnant? Can&#39;t remember.)</p>
    <p>One thing that pops into my mind is that even within one ABI we
      have to change it periodically.  I&#39;m thinking mostly library
      here.  But even language ABI you might want to date rather than
      just 1 or 0.  The library ABI would depend on library vendor more
      than chip vendor.<br>
    </p>
    <p>Jason Merrill knows a lot about this I think.</p>
    <p>Ed</p>
    <p>__cpp_abi_itanium yyyymm</p>
    <p>...</p>
    <p>__cpp_lib_abi_gnu yyyymm</p>
    <p>__cpp_lib_abi_msvc yyyymm</p>
    <p><br>
    </p>
    <p>I know both language and library ABI would change with compiler
      switches.<br>
    </p>
    <p>In libstdc++ we can switch between a CoW string/list O(n)-size to
      a C++11 string/O(1) list size world.</p>
    <p>I&#39;m interested in this.</p><span class="HOEnZb"><font color="#888888">
    <p>Ed</p>
    <p><br>
    </p>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
Features mailing list<br>
<a href="mailto:Features@isocpp.open-std.org">Features@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/features" rel="noreferrer" target="_blank">http://www.open-std.org/<wbr>mailman/listinfo/features</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div></div>