Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Sep 2016 13:57:42 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r305392 - head/sys/conf
Message-ID:  <CAG6CVpXLQYj_7G%2BU=CNM7ftz7A0FprPn0Nk6VkKTT6-e_wOYNQ@mail.gmail.com>
In-Reply-To: <000B5E66-D804-4317-9957-8BDEDBD6B7F6@FreeBSD.org>
References:  <201609041755.u84HtMa5060050@repo.freebsd.org> <CAG6CVpU%2BeWvmdC-VzZ6jtQaUydsH4=9NNao8XPu2fSr0LYDgqQ@mail.gmail.com> <D294D78E-6C86-4AA2-B804-DF55D431AA91@FreeBSD.org> <CAG6CVpUsC9DqCKVjXgCH99fpGukhZRYw3OnG-_WzqsX-ahGDpw@mail.gmail.com> <000B5E66-D804-4317-9957-8BDEDBD6B7F6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hm, the GCC 5.3 manual page mentions at least -Wshift-count-negative,
-Wshift-count-overflow, and -Wcast-qual.

Best,
Conrad

On Sun, Sep 4, 2016 at 1:36 PM, Dimitry Andric <dim@freebsd.org> wrote:
> Not in this particular case, as the section is exclusively meant for
> clang.  Most of these warning options are completely different from
> gcc's.  The gcc related section is just below this part in kern.mk.
>
> -Dimitry
>
>> On 04 Sep 2016, at 22:03, Conrad Meyer <cem@FreeBSD.org> wrote:
>>
>> Assuming we'd like to enable building with both compilers for now,
>> isn't it better to use a form both accept?
>>
>> Best,
>> Conrad
>>
>> On Sun, Sep 4, 2016 at 12:31 PM, Dimitry Andric <dim@freebsd.org> wrote:
>>> On 04 Sep 2016, at 20:57, Conrad Meyer <cem@FreeBSD.org> wrote:
>>>>
>>>> On Sun, Sep 4, 2016 at 10:55 AM, Dimitry Andric <dim@freebsd.org> wrote:
>>>>> Author: dim
>>>>> Date: Sun Sep  4 17:55:22 2016
>>>>> New Revision: 305392
>>>>> URL: https://svnweb.freebsd.org/changeset/base/305392
>>>>>
>>>>> Log:
>>>>> For kernel builds, instead of suppressing certain clang warnings, make
>>>>> them non-fatal, so there is some incentive to fix them eventually.
>>>>>
>>>>> Modified:
>>>>> head/sys/conf/kern.mk
>>>>>
>>>>> Modified: head/sys/conf/kern.mk
>>>>> ==============================================================================
>>>>> --- head/sys/conf/kern.mk       Sun Sep  4 17:50:23 2016        (r305391)
>>>>> +++ head/sys/conf/kern.mk       Sun Sep  4 17:55:22 2016        (r305392)
>>>>> @@ -17,13 +17,13 @@ CWARNFLAGS?=        -Wall -Wredundant-decls -Wn
>>>>> # kernel where fixing them is more trouble than it is worth, or where there is
>>>>> # a false positive.
>>>>> .if ${COMPILER_TYPE} == "clang"
>>>>> -NO_WCONSTANT_CONVERSION=       -Wno-constant-conversion
>>>>> -NO_WSHIFT_COUNT_NEGATIVE=      -Wno-shift-count-negative
>>>>> -NO_WSHIFT_COUNT_OVERFLOW=      -Wno-shift-count-overflow
>>>>> -NO_WSELF_ASSIGN=               -Wno-self-assign
>>>>> -NO_WUNNEEDED_INTERNAL_DECL=    -Wno-unneeded-internal-declaration
>>>>> +NO_WCONSTANT_CONVERSION=       -Wno-error-constant-conversion
>>>>> +NO_WSHIFT_COUNT_NEGATIVE=      -Wno-error-shift-count-negative
>>>>> +NO_WSHIFT_COUNT_OVERFLOW=      -Wno-error-shift-count-overflow
>>>>> +NO_WSELF_ASSIGN=               -Wno-error-self-assign
>>>>> +NO_WUNNEEDED_INTERNAL_DECL=    -Wno-error-unneeded-internal-declaration
>>>>> NO_WSOMETIMES_UNINITIALIZED=   -Wno-error-sometimes-uninitialized
>>>>> -NO_WCAST_QUAL=                 -Wno-cast-qual
>>>>> +NO_WCAST_QUAL=                 -Wno-error-cast-qual
>>>>
>>>> I like goal of the change.  Shouldn't these be -Wno-error=cast-qual,
>>>> etc., though?
>>>
>>> That's how gcc spells them.  Clang accepts both forms, there is no
>>> functional difference.
>>>
>>> -Dimitry
>>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpXLQYj_7G%2BU=CNM7ftz7A0FprPn0Nk6VkKTT6-e_wOYNQ>