From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id A991895FF for ; Fri, 8 Jul 2016 17:23:07 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id n127so15058006wme.1 for ; Fri, 08 Jul 2016 08:23:07 -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=UCiNRUmJKsR/f8jS1cadqrPfySSfpG/2jfJQlZg1KHM=; b=H1jfWCZAWQnWeYhPOHJHKEur17VtQaJJM8+dHZjpavF4IiExn3eCtMoawwhJ4luUke fgxfeE4QT/57tRTpP287r9OWK896+JePHLKxdfrzlZyyLm8hOWFHr3URiy0hKUqlekAL UJnMJ57uG2KWYyYgQSrZSPUtStpqhjXdaKD07guJbs+rF6f2StKr53GKU0VSorMp4gIA WgpiwHM6JkecjCYNgETxBbuSOFMeGbZEL5oGT1cd9aK3KE4lohhG0EnHHKV6ZqPQV8b/ XOiyX0Jc4WEC/fbogN+4QHsS0sS1pc0fBJw6ORgBy/uVnrZoX5C7G/mZ83V+rhgU5oZ/ Ifcw== 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=UCiNRUmJKsR/f8jS1cadqrPfySSfpG/2jfJQlZg1KHM=; b=O/h5c/HsXvkMedrcSdMeLE9i9LjVh8yP3OSZoTPLNbjav5AlhqFjziKhp2epkOWqbQ N039dNJ/qgjxZ4WK95tTo1cEEXklZ7EMw9Vc3jHyU4TWsAlc4uvfjx5elQsE2f+N5WKS MtcWqAgi3oOXw6WlhfYdpjUxMZfX8vz9pHctNxosbbxbzQtKRkZg8c1zSk1+rPrQdGhD opCtL3MTioiI+od4bqcEh/FRBkltyIHPIdzIO39MBJ/R1o2WHLSVXCtIHGCjFu3Jy1T1 Ccxw4LLECZ+x3F9WDzdo0JRH0NxFRNUw8zNpHJYUm7tZCnYSf5tmzcVrBjWUatBSm3eA qMZA== X-Gm-Message-State: ALyK8tI86KytcPUppQmWF0GRjS32LC6civfma8U+VVRo+5sJnaHzeSIAlW63/J7VpSBB32M3 X-Received: by 10.28.126.195 with SMTP id z186mr4050923wmc.95.1467991387392; Fri, 08 Jul 2016 08:23:07 -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 k6sm2297181wjz.28.2016.07.08.08.23.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jul 2016 08:23:06 -0700 (PDT) Date: Fri, 8 Jul 2016 17:23:04 +0200 From: Adrien Mazarguil To: Ferruh Yigit Cc: "Wiles, Keith" , "dev@dpdk.org" Message-ID: <20160708152304.GH7621@6wind.com> Mail-Followup-To: Ferruh Yigit , "Wiles, Keith" , "dev@dpdk.org" References: <10B01822-557C-400A-A6BE-DBFF60AF90E4@intel.com> <20160708080543.GB7621@6wind.com> <577F78E9.8020705@intel.com> <20160708143512.GG7621@6wind.com> <577FBC9E.30604@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <577FBC9E.30604@intel.com> Subject: Re: [dpdk-dev] [PATCH v3 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: Fri, 08 Jul 2016 15:23:07 -0000 On Fri, Jul 08, 2016 at 03:45:50PM +0100, Ferruh Yigit wrote: > On 7/8/2016 3:35 PM, Adrien Mazarguil wrote: > > On Fri, Jul 08, 2016 at 02:15:37PM +0000, Wiles, Keith wrote: > >> > >>> On Jul 8, 2016, at 4:56 AM, Yigit, Ferruh wrote: > >>> > >>> On 7/8/2016 9:05 AM, Adrien Mazarguil wrote: > >>>> On Thu, Jul 07, 2016 at 06:33:17PM +0000, Wiles, Keith wrote: > >>>>> > >>>>>> On Jul 7, 2016, at 10:49 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). > >>>>> > >>>>> Do you try compiling these changes with CLANG and/or ICC compilers? > >>>> > >>>> clang/clang++ yes, works fine. I did not try with ICC however. > >>> > >>> I tested with icc, getting following error [1], compiler warning seems > >>> valid, but didn't investigate what in your patch cause this. > >>> > >>> [1] > >>> .../app/test/test_table_acl.c(487): error #2405: array of elements > >>> containing a flexible array member is nonstandard > >>> struct rte_pipeline_table_entry entries[5]; > >>> ^ > >>> > >>> .../app/test/test_table_acl.c(492): error #2405: array of elements > >>> containing a flexible array member is nonstandard > >>> struct rte_pipeline_table_entry entries_ptr[5]; > >> > >> I am guessing it does not like the uint8_t action_data[0] in the rte_pipeline_table_entry structure. I can see why it would be non-standard allocated on the stack in this case. Maybe a keyword like __extension__ needs to be added or pragma. > > > > Hmmm, right, a variable array cannot be embedded like that. I think a change > > in test_table_acl.c would be better. > Correct, I just wonder why not getting this same compiler warning before > your changes. > > ... I guess declaring a zero-sized array does not give the same compiler constraints as declaring a variable-sized one even though the structure has the same size in both cases. C99 does not allow it. This is probably the only difference. > > > Is that the only issue you saw? > > > Yes. OK then, prepare for v4. > >>>> Note that considering "({ ... })" is a GNU extension, compilers that do > >>>> support this syntax also support the GNU __extension__ keyword. As a result, > >>>> those that do not support this keyword most likely already cannot compile > >>>> DPDK at all. -- Adrien Mazarguil 6WIND