The macro __GLIBCXX__
contains the time stamp of libstdc++ releases, e.g., from gcc documentation (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html)
__GLIBCXX__
The current version of libstdc++ in compressed ISO date format, as an unsigned long. For details on the value of this particular macro for a particular release, please consult the ABI Policy and Guidelines appendix.
I am looking for the values for all releases since the release of 4.9.0 (including releases of smaller versions like 4.8.x).
The documentation of libstdc++ does not seem to provide this information (it only provides the dates up to gcc 4.7.0).
Where can I find the values of __GLIBCXX__
? Does anybody have them?
The ABI Policy and Guidelines appendix (https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) says
Incremental bumping of a library pre-defined macro. For releases before 3.4.0, the macro is GLIBCPP. For later releases, it's GLIBCXX. (The libstdc++ project generously changed from CPP to CXX throughout its source to allow the "C" pre-processor the CPP macro namespace.) These macros are defined as the date the library was released, in compressed ISO date format, as an unsigned long.
but then only provides the values of the macro up to GCC 4.7.0. Still the day of a particular GCC releases are listed here:
https://gcc.gnu.org/releases.html
but for example for GCC 4.9.1 with release date "July 16, 2014" the ISO date format is 20140716 and the value of __GLIBCXX__
is 20140617 (notice the 7 and 6 have been switched).
The information you want is useless anyway, so you should solve your problem a different way.
GCC 4.9.3 was released after GCC 5.3, so it has a later date in that macro, so you can't just do something like:
#if __GLIBCXX__ > 20150422 // GCC 5.1 release
because that would be true for 4.9.3, but that doesn't have all the features that 5.1 has.
Most GNU/Linux distros don't ship official FSF releases either, they build snapshots, which will have the date of the snapshot, which won't be in any list of release dates. And a snapshot from the 5.x branch on a given day will have the same date as a snapshot from the 6.x branch on a given day, so you can't tell them apart.