public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ PATCH to change default dialect to C++14
@ 2015-07-01 18:27 Jason Merrill
  2015-07-01 18:39 ` Marek Polacek
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jason Merrill @ 2015-07-01 18:27 UTC (permalink / raw)
  To: gcc-patches List

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

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.

[-- Attachment #2: cxx14.patch --]
[-- Type: text/x-patch, Size: 1426 bytes --]

commit 6f2b3941ffb3734cecc05507dd8ed46f6a6d4f2d
Author: Jason Merrill <jason@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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-07-10 11:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-01 18:27 C++ PATCH to change default dialect to C++14 Jason Merrill
2015-07-01 18:39 ` Marek Polacek
2015-07-02  4:10 ` Jim Wilson
2015-07-02  5:21   ` Jason Merrill
2015-07-02  6:17     ` Jim Wilson
2015-07-02 23:41       ` Jim Wilson
2015-07-03  8:43         ` Richard Biener
2015-07-03 14:43         ` Jason Merrill
2015-07-02  6:18     ` Marc Glisse
2015-07-02 13:05       ` Richard Biener
2015-07-02 13:08         ` Richard Biener
2015-07-02 15:53           ` Jim Wilson
2015-07-10 11:27 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).