Thats an excellent point about the fact that the ABI does evolve over time.  You've convinced me on the use of the yyyymmdd instead of the boolean for the values.

As to your point of how the language runtime/ABI library would be influenced by this is exactly the motivation for this!

On Sat, Jan 7, 2017 at 12:32 PM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
On 01/06/2017 08:45 PM, Saleem Abdulrasool wrote:
Hi,

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:

__cpp_abi_itanium
__cpp_abi_microsoft

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.

Thanks!

-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org


_______________________________________________
Features mailing list
Features@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/features

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.

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.)

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.

Jason Merrill knows a lot about this I think.

Ed

__cpp_abi_itanium yyyymm

...

__cpp_lib_abi_gnu yyyymm

__cpp_lib_abi_msvc yyyymm


I know both language and library ABI would change with compiler switches.

In libstdc++ we can switch between a CoW string/list O(n)-size to a C++11 string/O(1) list size world.

I'm interested in this.

Ed



_______________________________________________
Features mailing list
Features@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/features




--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org