From patchwork Fri Mar 1 14:51:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Dos Reis X-Patchwork-Id: 224382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DFB022C02CE for ; Sat, 2 Mar 2013 01:51:57 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1362754318; h=Comment: DomainKey-Signature:Received:Received:Received:Received:From:To: Cc:Subject:Date:Message-ID:Lines:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=1PQoCPDqxJedc3zH3Hh9 bc/ih1g=; b=Bds2GR9ljNJOIuHSuLLee5X+4YAt0/KxwZ8Cvwv7Rxgd9OEc6xiv LqS55pN5l9YOIE3CRw0drThwlVjO4ATG/SKQHsoB1oFeocQjZw/sQWjYJURukz2n qgHxlrEn5S7fOyTvJSrf6/eVjSeafrSgqqEDaDXadmc9FB+4HGRDMR0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:From:To:Cc:Subject:Date:Message-ID:Lines:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Fk/FGPsotFoYACSbZVOQ8vZs0qFJELQsq8PQmyJbz9D98BOkXf33VIgZYk+WYt JSeb/AWbflyXazg26KJ8QfCYrMmIYH5lNLgRYOuOUEgW0Ryd/IXcEU56v/r6hSyD Bcapqm2fzk31TgH5TNmAppijACMgQoNKGhDY+EsOmE79E=; Received: (qmail 28745 invoked by alias); 1 Mar 2013 14:51:45 -0000 Received: (qmail 28732 invoked by uid 22791); 1 Mar 2013 14:51:44 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_CX X-Spam-Check-By: sourceware.org Received: from www.axiomatics.org (HELO mail.axiomatics.org) (66.228.53.191) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Mar 2013 14:51:19 +0000 Received: by mail.axiomatics.org (Postfix, from userid 1000) id 497C3EBD5; Fri, 1 Mar 2013 08:51:18 -0600 (CST) From: Gabriel Dos Reis To: gcc-patches@gcc.gnu.org Cc: Andrew Sutton Subject: [c++-concepts] Enable C++11 and concepts by default Date: Fri, 01 Mar 2013 08:51:17 -0600 Message-ID: <87sj4fcgwq.fsf@euclid.axiomatics.org> Lines: 69 MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch enables C++11 and concepts support by default on the c++-concepts branch. -- Gaby 2013-03-01 Gabriel Dos Reis * 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