From owner-svn-src-head@freebsd.org Sat Feb 17 09:47:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 962A3F20F3F; Sat, 17 Feb 2018 09:47:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E1467177A; Sat, 17 Feb 2018 09:47:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B13942600DF; Sat, 17 Feb 2018 10:47:45 +0100 (CET) Subject: Re: svn commit: r329371 - head/sys/compat/linuxkpi/common/include/asm To: Jan Beich Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201802161520.w1GFKLiA049085@repo.freebsd.org> <6f790c90-8c65-ab0b-4a58-2814be55f09f@selasky.org> From: Hans Petter Selasky Message-ID: Date: Sat, 17 Feb 2018 10:44:49 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 09:47:47 -0000 On 02/17/18 10:33, Jan Beich wrote: > Hans Petter Selasky writes: > >> On 02/17/18 01:42, Jan Beich wrote: >> >>> Hans Petter Selasky 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