This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[c++-concepts] Enable C++11 and concepts by default


This patch enables C++11 and concepts support by default on the
c++-concepts branch.

-- Gaby

2013-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* gcc/c-family/c-common.c (cxx_dialect): Set C++11 as default.
	* gcc/c-family/c.opt(flag_concepts): Add.
	* gcc/cp/lex.c (flag_concepts): New.  Enabled concept support by
	default. 

Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c	(revision 196383)
+++ gcc/c-family/c-common.c	(working copy)
@@ -238,9 +238,9 @@
 
 int flag_use_repository;
 
-/* The C++ dialect being used. C++98 is the default.  */
+/* The C++ dialect being used. C++11 is the default.  */
 
-enum cxx_dialect cxx_dialect = cxx98;
+enum cxx_dialect cxx_dialect = cxx11;
 
 /* Maximum template instantiation depth.  This limit exists to limit the
    time it takes to notice excessively recursive template instantiations.
Index: gcc/c-family/c.opt
===================================================================
--- gcc/c-family/c.opt	(revision 196383)
+++ gcc/c-family/c.opt	(working copy)
@@ -21,6 +21,10 @@
 
 ; Please try to keep this file in ASCII collating order.
 
+; Activate C++ concepts support.
+Variable
+bool flag_concepts
+
 Language
 C
 
@@ -843,6 +847,10 @@
 C ObjC C++ ObjC++
 Where shorter, use canonicalized paths to systems headers.
 
+fconcepts
+C++ ObjC++ Var(flag_concepts, true)
+Activate support for C++ concepts
+
 fcheck-new
 C++ ObjC++ Var(flag_check_new)
 Check the return value of new
Index: gcc/cp/lex.c
===================================================================
--- gcc/cp/lex.c	(revision 196383)
+++ gcc/cp/lex.c	(working copy)
@@ -51,6 +51,9 @@
 /* A constraint that can be tested at compile time.  */
 #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1]
 
+/* True if C++ concepts are enabled. */
+bool flag_concepts = true;
+
 /* Functions and data structures for #pragma interface.
 
    `#pragma implementation' means that the main file being compiled


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]