From owner-svn-src-all@freebsd.org Wed Mar 8 09:04:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCEA0D020FF; Wed, 8 Mar 2017 09:04:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id A54E51536; Wed, 8 Mar 2017 09:04:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 90763107754; Wed, 8 Mar 2017 19:47:14 +1100 (AEDT) Date: Wed, 8 Mar 2017 19:47:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andriy Gapon cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314862 - head/sys/modules/qlxgbe In-Reply-To: <70fcdcf4-cfa5-2382-ea60-55ac1a91e06b@FreeBSD.org> Message-ID: <20170308193709.Q2738@besplex.bde.org> References: <201703071543.v27FhnoL024242@repo.freebsd.org> <20170307221733.GN1044@FreeBSD.org> <70fcdcf4-cfa5-2382-ea60-55ac1a91e06b@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=mFxPUxjnRlF-8e7qPooA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2017 09:04:36 -0000 On Wed, 8 Mar 2017, Andriy Gapon wrote: > On 08/03/2017 00:17, Gleb Smirnoff wrote: >> On Tue, Mar 07, 2017 at 03:43:49PM +0000, Andriy Gapon wrote: >> A> Author: avg >> A> Date: Tue Mar 7 15:43:49 2017 >> A> New Revision: 314862 >> A> URL: https://svnweb.freebsd.org/changeset/base/314862 >> A> >> A> Log: >> A> qlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy >> A> >> A> The module uses unnamed structure and union fields and base GCC in >> A> stable/10 doesn't like it. >> A> I think that that is a C11 feature, so it is courteous of more modern >> A> compilers to not complain about it when compiling in C99 mode. >> >> There are a lot of code in kernel, that uses anonymous structs and unions. >> This feature is enabled globally. Why does this module need special treatment? There is not a lot of such code. There are a lot of ugly macros like 'define v_rdev v_un.vu_cdev' to avoid having such code since it is unportable. > That's a good question and I don't have a good answer to it. > All I can say is that a GCC build of GENERIC and modules failed in that fashion > only for this module (in stable/10). > Maybe I described the problem incorrectly. Then, a proper explanation is welcome. I think gcc always had anonymous struct/unions, but GCC_MS_EXTENSIONS gives a MSS variant of them which is even more unportable (but may actually be better). Bruce