llvm-project/libcxx
Eric Fiselier 5de7cacf07 Make GCC in C++03 Unsupported
Summary:
This patch make G++03 explicitly unsupported with libc++, as discussed on the mailing lists.


Below is the rational for this decision.
----------------------------------------------------------------------------------------------------

libc++ claims to support GCC with C++03 ("G++03"), and this is a problem for our users.

Our C++03 users are all using Clang. They must be.  Less than 9% of the C++03 tests pass with GCC [1][2]. No non-trivial C++ program could work.

Attempting to support G++03 impacts our QoI considerably. Unlike Clang, G++03 offers almost no C++11 extensions. If we could remove all the fallbacks for G++03, it would mean libc++ could::

* Improve Correctness:

Every `#ifdef _LIBCPP_HAS_NO_<C++11-feature>` is a bug manifest. It exists to admit for deviant semantics.

* Achieve ABI stability between C++03 and C++11

Differences between our C++03 and C++Rest branches contain ABI bugs. For example `std::nullptr_t` and `std::function::operator()(...)` are currently incompatible between C++11 and C++03, but could be fixed.

* Decrease Compile Times and Memory Usage:

Writing efficient SFINAE requires C++11. Using alias templates, libc++ could reduce the number of instantiations it produces substantially.

* Decrease Binary Size

Similar to the last point, G++03 forces metaprogramming techniques that emit more debug information [3] [4]. Compared to libstdc++, debug information size increases of +10% are not uncommon.

Reviewers: ldionne, mclow.lists, EricWF

Reviewed By: ldionne, EricWF

Subscribers: zoecarver, aprantl, dexonsmith, arphaman, libcxx-commits, #libc

Differential Revision: https://reviews.llvm.org/D63154

llvm-svn: 363219
2019-06-13 00:37:25 +00:00
..
benchmarks [libc++][CMake] Refactor how we link against system libraries 2019-04-30 15:44:19 +00:00
cmake [libcxx][libcxxabi] Remove the unused CMake checks 2019-05-30 06:08:56 +00:00
docs Make GCC in C++03 Unsupported 2019-06-13 00:37:25 +00:00
fuzzing Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
include Make GCC in C++03 Unsupported 2019-06-13 00:37:25 +00:00
lib [libcxx] Move CMake file to src, avoid using globs 2019-05-01 06:40:36 +00:00
src Recommit r362649, which was reverted in r262680 because of bugs in std::to_chars (which have now been fixed). Speedup to_string and to_wstring for integers using stack buffer and SSO 2019-06-10 23:20:01 +00:00
test [libcxx] XFAIL set/multiset CTAD tests on Apple Clang 10 2019-06-12 22:01:05 +00:00
utils [libcxx] Use libtool when merging archives on Apple platforms 2019-06-02 01:14:31 +00:00
www [libcxx] Slightly improved policy for handling experimental features 2019-06-11 14:48:40 +00:00
.arcconfig [libcxx] Set up .arcconfig to point to new Diffusion CXX repository 2017-12-04 17:55:28 +00:00
.clang-format Make clang-format use C++03 syntax 2017-04-15 02:45:43 +00:00
.gitignore
CMakeLists.txt [runtimes] Check if pragma comment(lib, ...) is supported first 2019-05-30 04:40:21 +00:00
CREDITS.TXT Try again, this time with the correct address 2017-12-29 19:26:53 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
NOTES.TXT Reland "Use custom command and target to install libc++ headers" 2018-06-12 03:10:02 +00:00
TODO.TXT Add list of filesystem NB comments to TODO.TXT so they can be tracked separately 2017-03-06 21:23:36 +00:00
appveyor-reqs-install.cmd Attempt to upgrade compiler used by appveyor builds 2019-04-03 20:40:01 +00:00
appveyor.yml disable appveyor config for MSVC 2015 2019-04-03 20:36:51 +00:00