I've been threatening to do this for a couple of months, and now that
the regressions are under control I think it's time. This patch changes
the default C++ dialect to C++14.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 6f2b3941ffb3734cecc05507dd8ed46f6a6d4f2d
Author: Jason Merrill <ja...@redhat.com>
Date: Fri May 8 17:02:05 2015 -0500
gcc/c-family/
* c-opts.c (c_common_post_options): Default to C++14.
gcc/testsuite/
* lib/target-supports.exp (cxx_default): Set to C++14.
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 195045e..80481c3 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -889,9 +889,9 @@ c_common_post_options (const char **pfilename)
if (flag_abi_version == 0)
flag_abi_version = 10;
- /* Set C++ standard to C++98 if not specified on the command line. */
+ /* Set C++ standard to C++14 if not specified on the command line. */
if (c_dialect_cxx () && cxx_dialect == cxx_unset)
- set_std_cxx98 (/*ISO*/false);
+ set_std_cxx14 (/*ISO*/false);
if (cxx_dialect >= cxx11)
{
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index fc05e84..bf512e9 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5935,7 +5935,7 @@ proc check_effective_target_c++ { } {
return 0
}
-set cxx_default "c++98"
+set cxx_default "c++14"
# Check whether the current active language standard supports the features
# of C++11/C++14 by checking for the presence of one of the -std flags.
# This assumes that the default for the compiler is $cxx_default, and that