From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43031 invoked by alias); 6 May 2016 20:47:47 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 43001 invoked by uid 89); 6 May 2016 20:47:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*r:jit@gcc.gnu.org, FINAL, claims X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-ob0-f171.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=esACTkrd9XbtEjLhQF1jFwAfwdMex+3yUp3cF6LwGVg=; b=PyJTkX1XsahqTaWtA6bDqXSK0lEMsLCbmhcVVGB4PqcRj+MsL/WP8gDrkXkJWO6zs6 X9NuD89lnW1lgFYCa7Ibeg7X5I70Zv3cufQomLbJz88bqIcGEciRm4TvrJ58HhPyky04 9WMY/4kjIUo9DUeNQhi5IvJRWQg82f3ShqrZrYhrSb6cihNH5+/veLkiZ5AqxdYUU0HR kj/vsdw+AnZl1LNwAMyruqBrzedHtOBjTy99nAbEWaXXgrbU/qStmm3q5hKMk2ZfUakO Wc8UoYW/bmznQC2Rr/juPqwptqr1uWp1nKpg/XX3r40NONZ/9gOXhCojeEOBYUvD4vMm BrFw== X-Gm-Message-State: AOPr4FVCtESeRXZmLsiFX2N/ohba8JgZ3VjKL5Re36P0Kb4wwnSUJ8eUPJAsz68fHpF9B5CBPvTz0V9OevnTYACb X-Received: by 10.182.23.81 with SMTP id k17mr10700089obf.68.1462567663723; Fri, 06 May 2016 13:47:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1462552846-17096-1-git-send-email-dmalcolm@redhat.com> From: Jason Merrill Date: Fri, 01 Jan 2016 00:00:00 -0000 Message-ID: Subject: Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h To: Pedro Alves Cc: David Malcolm , gcc-patches List , jit@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-q2/txt/msg00009.txt.bz2 On Fri, May 6, 2016 at 1:56 PM, Pedro Alves wrote: > On 05/06/2016 05:40 PM, David Malcolm wrote: >> +#if __cplusplus >= 201103 >> +/* C++11 claims to be available: use it: */ >> +#define OVERRIDE override >> +#define FINAL final >> +#else >> +/* No C++11 support; leave the macros empty: */ >> +#define OVERRIDE >> +#define FINAL >> +#endif >> + > > Is there a reason this is preferred over using override/final in > the sources directly, and then define them away as empty > on pre-C++11? > > I mean: > > #if __cplusplus < 201103 > # define override > # define final > #endif > > then use override/final throughout instead of OVERRIDE/FINAL. This would break any existing use of those identifiers; they are not keywords, so a variable named "final" is perfectly valid C++11. Jason