Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2018 10:44:49 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Jan Beich <jbeich@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r329371 - head/sys/compat/linuxkpi/common/include/asm
Message-ID:  <d267f2b7-1586-15bd-7fb5-e19e5c16597f@selasky.org>
In-Reply-To: <tvug-c64r-wny@FreeBSD.org>
References:  <201802161520.w1GFKLiA049085@repo.freebsd.org> <mv08-30rc-wny@FreeBSD.org> <6f790c90-8c65-ab0b-4a58-2814be55f09f@selasky.org> <tvug-c64r-wny@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/17/18 10:33, Jan Beich wrote:
> Hans Petter Selasky <hps@selasky.org> writes:
> 
>> On 02/17/18 01:42, Jan Beich wrote:
>>
>>> Hans Petter Selasky <hselasky@FreeBSD.org> writes:
>>>
>>>> Author: hselasky
>>>> Date: Fri Feb 16 15:20:21 2018
>>>> New Revision: 329371
>>>> URL: https://svnweb.freebsd.org/changeset/base/329371
>>>>
>>>> Log:
>>>>     Allow the cmpxchg() macro in the LinuxKPI to work on pointers without
>>>>     generating compiler warnings, -Wint-conversion .
>>> [...]
>>>
>>> To generate errors instead ?
>>>
>>> $ make clean all -C /usr/ports/graphics/drm-next-kmod
>>> [...]
>>> drm_lock.c:72:10: error: flexible array member 'u8' in a union is not allowed
>>>                   prev = cmpxchg(lock, old, new);
>>>                          ^
>>
>> I believe this is a regression issue in GCC:
>>
>> https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01505.html
> 
> If you didn't notice that bug is for C++, not C. GCC and Clang accept
> flexible array members in unions only in C++. cmpxchg() from linuxkpi
> doesn't seem to be used anywhere in the tree. If the macro didn't expand
> there's nothing to produce an error for.
> 
> Anyway, I confirm r329447 fixed graphics/drm-next-kmod build.
> 

Hi,

It looks like there has been a testing issue on my side:

drm_lock.c:72:10: error: field has incomplete type 'u64 []'

This is an older clang.

Thanks for reporting!

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d267f2b7-1586-15bd-7fb5-e19e5c16597f>