Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2017 01:00:30 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r314862 - head/sys/modules/qlxgbe
Message-ID:  <70fcdcf4-cfa5-2382-ea60-55ac1a91e06b@FreeBSD.org>
In-Reply-To: <20170307221733.GN1044@FreeBSD.org>
References:  <201703071543.v27FhnoL024242@repo.freebsd.org> <20170307221733.GN1044@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

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.

--- ql_hw.o ---
cc1: warnings being treated as errors
In file included from
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:44:
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:158:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:160:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:200:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:202:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:226:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:228:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:239:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:241:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:249:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:251:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:315:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:317:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:350:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:352:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:368:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:370:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:384:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:386:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:403:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:405:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:416:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:418:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:439:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_minidump.h:441:
warning: declaration does not declare anything
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_entry_err_chk':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4046:
error: 'ql_minidump_entry_hdr_t' has no member named 'driver_flags'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_parse_template':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4098:
error: 'ql_minidump_entry_hdr_t' has no member named 'entry_capture_mask'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4100:
error: 'ql_minidump_entry_hdr_t' has no member named 'driver_flags'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4119:
error: 'ql_minidump_entry_hdr_t' has no member named 'driver_flags'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4170:
error: 'ql_minidump_entry_hdr_t' has no member named 'driver_flags'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4230:
error: 'ql_minidump_entry_hdr_t' has no member named 'driver_flags'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4234:
error: 'ql_minidump_entry_hdr_t' has no member named 'driver_flags'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_rdcrb':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4267:
error: 'ql_minidump_entry_rdcrb_t' has no member named 'addr_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_L2Cache':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4310:
error: 'ql_minidump_entry_cache_t' has no member named 'write_value'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4314:
error: 'ql_minidump_entry_cache_t' has no member named 'init_tag_value'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4315:
error: 'ql_minidump_entry_cache_t' has no member named 'read_addr_cnt'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4323:
error: 'ql_minidump_entry_cache_t' has no member named 'write_value'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4331:
error: 'ql_minidump_entry_cache_t' has no member named 'poll_mask'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4333:
error: 'ql_minidump_entry_cache_t' has no member named 'poll_wait'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4341:
error: 'ql_minidump_entry_cache_t' has no member named 'poll_mask'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4376:
error: 'ql_minidump_entry_cache_t' has no member named 'read_addr_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4379:
error: 'ql_minidump_entry_cache_t' has no member named 'tag_value_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_L1Cache':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4407:
error: 'ql_minidump_entry_cache_t' has no member named 'write_value'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4411:
error: 'ql_minidump_entry_cache_t' has no member named 'init_tag_value'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4412:
error: 'ql_minidump_entry_cache_t' has no member named 'read_addr_cnt'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4432:
error: 'ql_minidump_entry_cache_t' has no member named 'read_addr_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4435:
error: 'ql_minidump_entry_cache_t' has no member named 'tag_value_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_rdmux2':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4630:
error: 'ql_minidump_entry_mux2_t' has no member named 'select_value_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4631:
error: 'ql_minidump_entry_mux2_t' has no member named 'select_value_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_rdqueue':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4652:
error: 'ql_minidump_entry_queue_t' has no member named 'read_addr_cnt'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4653:
error: 'ql_minidump_entry_queue_t' has no member named 'read_addr_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4675:
error: 'ql_minidump_entry_queue_t' has no member named 'queue_id_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_cntrl':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4698:
error: 'ql_minidump_entry_cntrl_t' has no member named 'opcode'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4760:
error: 'ql_minidump_entry_cntrl_t' has no member named 'poll_timeout'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4799:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_a'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4801:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_a'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4810:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_v'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4819:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_v'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4821:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_v'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4828:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_a'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4830:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_a'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4845:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_v'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4847:
error: 'ql_minidump_entry_cntrl_t' has no member named 'shl'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4848:
error: 'ql_minidump_entry_cntrl_t' has no member named 'shr'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4860:
error: 'ql_minidump_entry_cntrl_t' has no member named 'state_index_v'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4865:
error: 'ql_minidump_entry_cntrl_t' has no member named 'addr_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c: In
function 'ql_pollrd':
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4888:
error: 'ql_minidump_entry_pollrd_t' has no member named 'select_value_stride'
/usr/devel/svn/stable/10/sys/modules/qlxgbe/../../dev/qlxgbe/ql_hw.c:4889:
error: 'ql_minidump_entry_pollrd_t' has no member named 'op_count'
*** [ql_hw.o] Error code 1



-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?70fcdcf4-cfa5-2382-ea60-55ac1a91e06b>