From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1242 invoked by alias); 12 Nov 2014 14:35:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1152 invoked by uid 89); 12 Nov 2014 14:35:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f169.google.com Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 12 Nov 2014 14:35:35 +0000 Received: by mail-ob0-f169.google.com with SMTP id va2so9292198obc.0 for ; Wed, 12 Nov 2014 06:35:33 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.150.200 with SMTP id uk8mr2266497oeb.54.1415802933024; Wed, 12 Nov 2014 06:35:33 -0800 (PST) Received: by 10.76.101.132 with HTTP; Wed, 12 Nov 2014 06:35:32 -0800 (PST) In-Reply-To: <20141112131207.GY5026@tucnak.redhat.com> References: <20141112125512.GA26644@ovh.starynkevitch.net> <20141112131207.GY5026@tucnak.redhat.com> Date: Wed, 12 Nov 2014 14:37:00 -0000 Message-ID: Subject: Re: PATCH GCC5.0: conditionally skip gcc_version in gcc-plugin.h From: Richard Biener To: Jakub Jelinek Cc: Basile Starynkevitch , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg01230.txt.bz2 On Wed, Nov 12, 2014 at 2:12 PM, Jakub Jelinek wrote: > On Wed, Nov 12, 2014 at 01:55:12PM +0100, Basile Starynkevitch wrote: >> Hello All, >> >> Some plugins (including MELT, see http://gcc-melt.org/ for more) >> are made of several C++ source files which all include "plugin-version.h" >> because they have some C++ code which depends upon the particular version >> of GCC. >> >> So they typically code >> >> #if GCCPLUGIN_VERSION >= 4009 >> /* code for GCC 4.9 or newer. */ >> #else >> /* code for GCC 4.8 */ >> #endif /*GCCPLUGIN_VERSION*/ > > Can't you just remember that version in configure of your plugin? Or fix it properly by also generating a plugin-version.c file with the definitions and just provide declarations in plugin-version.h. Richard. > Jakub