libstdc++: Detect miscompilation of src/c++11/limits.cc

Add a #error directive to ensure that the definitions are not compiled
as C++17, which would prevent them being emitted.

libstdc++-v3/ChangeLog:

	PR libstdc++/98725
	* src/c++11/limits.cc: Fail if __cpp_inline_variables is
	defined.
This commit is contained in:
Jonathan Wakely 2021-10-08 14:45:23 +01:00
parent 946486ab4f
commit e6f6972b5f
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@
// 18.2.1
//
#if __cpp_inline_variables
# error This file must be compiled as C++11 or C++14
#endif
#include <limits>
namespace std _GLIBCXX_VISIBILITY(default)