mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
libstdc++: Add #error to some files that depend on a specific standard mode
Give more explicit errors if these files are not built with the correct -std options. libstdc++-v3/ChangeLog: * src/c++98/locale_init.cc: Require C++11. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Require C++98.
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if __cplusplus != 201103L
|
||||
# error This file must be compiled as C++11
|
||||
#endif
|
||||
|
||||
#define _GLIBCXX_USE_CXX11_ABI 1
|
||||
#include <clocale>
|
||||
#include <cstring>
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#if __cplusplus != 201103L
|
||||
# error This file must be compiled as C++11
|
||||
#endif
|
||||
|
||||
#define _GLIBCXX_USE_CXX11_ABI 1
|
||||
#include <clocale>
|
||||
#include <cstring>
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
// ISO C++ 14882:
|
||||
//
|
||||
|
||||
#if __cplusplus != 199711L
|
||||
# error This file must be compiled as C++98
|
||||
#endif
|
||||
|
||||
#define _GLIBCXX_USE_CXX11_ABI 1
|
||||
#define _GLIBCXX_DISAMBIGUATE_REPLACE_INST 1
|
||||
#include <string>
|
||||
|
||||
Reference in New Issue
Block a user