From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bruce.richardson@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id A66C6378E
 for <dev@dpdk.org>; Mon, 19 Sep 2016 17:26:08 +0200 (CEST)
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by fmsmga103.fm.intel.com with ESMTP; 19 Sep 2016 08:26:08 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.30,362,1470726000"; d="scan'208";a="170596950"
Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.73])
 by fmsmga004.fm.intel.com with SMTP; 19 Sep 2016 08:26:06 -0700
Received: by  (sSMTP sendmail emulation); Mon, 19 Sep 2016 16:26:05 +0025
Date: Mon, 19 Sep 2016 16:26:05 +0100
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Message-ID: <20160919152605.GG45548@bricha3-MOBL3>
References: <1474295814-4879-1-git-send-email-bruce.richardson@intel.com>
 <20160919145959.GB17252@6wind.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20160919145959.GB17252@6wind.com>
Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?=
 =?iso-8859-1?Q?opment?= Ireland Ltd.
User-Agent: Mutt/1.5.23 (2014-03-12)
Subject: Re: [dpdk-dev] [PATCH] net/mlx: fix compile errors with ignore
	pedantic pragma
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Sep 2016 15:26:09 -0000

On Mon, Sep 19, 2016 at 04:59:59PM +0200, Adrien Mazarguil wrote:
> Hi Bruce,
> 
> On Mon, Sep 19, 2016 at 03:36:54PM +0100, Bruce Richardson wrote:
> > With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with
> > debug enabled produces lots of errors complaining that "pedantic" is
> > not a warning level that can be ignored.
> > 
> > error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
> >  #pragma GCC diagnostic ignored "-pedantic"
> >                                  ^~~~~~~~~~~
> > 
> > These errors can be removed by changing the "-pedantic" to "-Wpedantic".
> 
> Nice to have a workaround, I thought they did not keep the option at all.
> However after testing:
> 
> - It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
>   "warning: unknown option after `#pragma GCC diagnostic' kind".
> 
> - GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or
>   -Wpedantic.
> 
> - GCC 6 can only supports -Wpedantic.
> 
> Note we're working toward removing the need for these #pragma in the first
> place as soon as possible, however in the meantime I fear that checking the
> GCC version is necessary.
> 
Depends on how old of GCC version we need to support. From the release notes
it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).

https://gcc.gnu.org/gcc-4.8/changes.html

Do we need to support compilation on gcc versions older than this?

Regards,
/Bruce