1From 4584b69c45b701c3689d6a974f1ee560a79a243e Mon Sep 17 00:00:00 2001 2From: Boris Kolpackov <boris@codesynthesis.com> 3Date: Mon, 8 Feb 2016 18:39:21 +0200 4Subject: [PATCH] Make compilable with GCC 6 in C++14 mode 5 6[Upstream: 61d13eb53ade9f30a64892a901401bda5e42c335] 7Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com> 8--- 9 odb/gcc.hxx | 9 ++++++--- 10 odb/parser.cxx | 2 ++ 11 2 files changed, 8 insertions(+), 3 deletions(-) 12 13diff --git a/odb/gcc.hxx b/odb/gcc.hxx 14index 858d685..a22357d 100644 15--- a/odb/gcc.hxx 16+++ b/odb/gcc.hxx 17@@ -7,9 +7,12 @@ 18 19 #include <odb/gcc-fwd.hxx> 20 21-#if BUILDING_GCC_MAJOR >= 6 22-# include <safe-ctype.h> // See gcc-fwd.hxx. 23-#endif 24+// Actually, let's keep it out. With it included we can compile in C++98 25+// but not in C++14 (GCC 6 default). 26+// 27+// #if BUILDING_GCC_MAJOR >= 6 28+// # include <safe-ctype.h> // See gcc-fwd.hxx. 29+// #endif 30 31 // GCC header includes to get the plugin and parse tree declarations. 32 // The order is important and doesn't follow any kind of logic. 33diff --git a/odb/parser.cxx b/odb/parser.cxx 34index feda9d4..a9d22fb 100644 35--- a/odb/parser.cxx 36+++ b/odb/parser.cxx 37@@ -1831,6 +1831,8 @@ create_type (tree t, 38 // the array type. In other words, we view it as "constant array" 39 // rather than "array of constant elements". 40 // 41+ using semantics::array; // vs std::array. 42+ 43 tree bt (TREE_TYPE (t)); 44 tree bt_mv (TYPE_MAIN_VARIANT (bt)); 45 type& bt_node (emit_type (bt_mv, access::public_, file, line, clmn)); 46-- 472.25.0 48 49