From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 79E9B2B8C for ; Tue, 5 Jul 2016 14:37:03 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id a66so150855092wme.0 for ; Tue, 05 Jul 2016 05:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=B4a/NmQA+TJd+vRdlJIRIYjyzPavFuzg1Yrsp49V6w4=; b=fqcwehFxQ8Usg1MIGWwMcCNQ/HF+yoJ28terEGk7Doe67RAIFhjromT/KWGTBKT93I aR36i7PWZyNZhQv3KfUGbZ6ncIEgasKjJSb6j2iKmFnD1G4wZ148XOgMqI0AM1Ghu7TU zldRVYWxOVfde26iwnGx2D2evBBrQhLrOKV8G4cEFWsTM14t0X6mpFmzswZbetgk96NL KoOIZ+i8DZgpTI5NBv+ZD6MFZpEpOYSTxDJrTMpRabFDhLsciKnhho21EOqvW39I01rf HciWsy+wBSBGQ3mKNq1GOYES6DBXmoRQg+hNe9e9QVNt+bI6W0Vyul4K9y1l/akG+y43 8evQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=B4a/NmQA+TJd+vRdlJIRIYjyzPavFuzg1Yrsp49V6w4=; b=WQjY0H09a5hRj68rA9cq9SUTF0oepjBhZir6vxPHh/BQ7UW/5h55s2IHvrxTOQNvEG TvH0LPrr/0sU5R8NlEpadJ94azD5pDdmS6se7UJjpmXkltRTDSzI/p+RzLadCbM6oceM cSbZ0hEivif0RFKoUWamUYDq4UyRruyejYvjUiRT/HJ32I+bPUbKSBJ5tp2i3ZGn+snD Y776UXH5Bbk8ZHkh4ZbZeARd7FO7WADJjYnFpB6Opk+tFd02wWFjdsSRgD/KoJi5mW0M hDIORXoU6JZ7vepACeykVVCX8IMURTkgT5i7Cg9ZI1UZTqnXw4qZ8G9vPQ9kssCN4Yr+ VbNA== X-Gm-Message-State: ALyK8tJTm+Jfz4zdZZhwxejyY2moZXklDdflytGLxC6d2sG96uOAKE9K4PiM8YfoYAa11OrW X-Received: by 10.28.143.212 with SMTP id r203mr15195730wmd.35.1467722223276; Tue, 05 Jul 2016 05:37:03 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id b84sm3905409wmb.6.2016.07.05.05.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jul 2016 05:37:02 -0700 (PDT) Date: Tue, 5 Jul 2016 14:37:00 +0200 From: Adrien Mazarguil To: Ferruh Yigit Cc: dev@dpdk.org, Jan Viktorin Message-ID: <20160705123700.GL7621@6wind.com> Mail-Followup-To: Ferruh Yigit , dev@dpdk.org, Jan Viktorin References: <1459865290-10248-1-git-send-email-adrien.mazarguil@6wind.com> <577B998A.4050009@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <577B998A.4050009@intel.com> Subject: Re: [dpdk-dev] [PATCH v2 00/11] Fix build errors related to exported headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 12:37:03 -0000 On Tue, Jul 05, 2016 at 12:27:06PM +0100, Ferruh Yigit wrote: > On 7/5/2016 11:44 AM, Adrien Mazarguil wrote: > > DPDK uses GNU C language extensions in most of its code base. This is fine > > for internal source files whose compilation flags are controlled by DPDK, > > however user applications that use exported "public" headers may experience > > compilation failures when enabling strict error/standard checks (-std and > > -pedantic for instance). > > Out of curiosity, is there a specific standard version that is targeted? Considering past discussions on more or less related topics (such as [1]), I think we target at least C99 compliance for exported headers only. It can be even better if we manage to have them comply with C90 but I think it is not worth the effort, as all the compilers we support do understand C99. C11 support is not widespread enough yet. Note that even after applying this series, exported headers are not really C99 compliant. Extensions are only made clear through the use of __extension__ keywords (and a few minor changes) that non-compliant statements are perfectly normal and compilers should not worry about them when compiling user applications with stricter flags than usual (-pedantic). Remember that the rest of DPDK can use whatever internally without explicit keywords as long as it works with the default set of options and all supported compiler versions for targetted platforms. This series does not change anything in this regard. Also C++ compat is on currently only on a best effort basis. Works as long as -pedantic is not specified, that is a task for later if we really want full compliance. In short: - Exported headers: C99, C++11 (best effort) - Internally: GNU C99/C11, no C++ (but I guess it would be C++11 considering the number of extensions we'd need otherwise). [1] http://dpdk.org/ml/archives/dev/2015-November/027355.html -- Adrien Mazarguil 6WIND