<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/06/2017 08:45 PM, Saleem
Abdulrasool wrote:<br>
</div>
<blockquote
cite="mid:CANXyDxtksZv5PWzY3La1xjvyF3YQGYGnF_MtYJViuNSZ-KD+-g@mail.gmail.com"
type="cite"><span
style="color:rgb(49,49,49);word-spacing:1px;background-color:rgb(255,255,255)">Hi,</span>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px"><br
class="gmail_msg">
</div>
<div class="gmail_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="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px"><br
class="gmail_msg">
</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px">__cpp_abi_itanium</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px">__cpp_abi_microsoft</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px"><br
class="gmail_msg">
</div>
<div class="gmail_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="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px"><br
class="gmail_msg">
</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px">Thanks!</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px"><br>
</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px">-- </div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px">Saleem Abdulrasool</div>
<div class="gmail_msg"
style="color:rgb(49,49,49);word-spacing:1px">compnerd (at)
compnerd (dot) org</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Features mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Features@isocpp.open-std.org">Features@isocpp.open-std.org</a>
<a class="moz-txt-link-freetext" href="http://www.open-std.org/mailman/listinfo/features">http://www.open-std.org/mailman/listinfo/features</a>
</pre>
</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't remember.)</p>
<p>One thing that pops into my mind is that even within one ABI we
have to change it periodically. I'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'm interested in this.</p>
<p>Ed</p>
<p><br>
</p>
</body>
</html>