Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 2017 14:48:51 -0500
From:      Eric van Gyzen <eric@vangyzen.net>
To:        Alan Somers <asomers@freebsd.org>, Warner Losh <imp@bsdimp.com>
Cc:        Ngie Cooper <yaneurabeya@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r317755 - head/sbin/ifconfig
Message-ID:  <e93b38b5-6d1b-b463-ab50-b3f9ac2c4a17@vangyzen.net>
In-Reply-To: <CAOtMX2iC9dqBmWHGODA%2BMg8caxeKP%2BtEGzGdXD48QaB0a9U5UQ@mail.gmail.com>
References:  <201705031721.v43HL2vS071819@repo.freebsd.org> <8EA7A2E9-A429-4DC2-85CE-1B5AAEDF86FD@gmail.com> <CAOtMX2hbiXAna_UxMonf1Drqx3PkzW2%2BToezai%2BQ32VYq_DXSg@mail.gmail.com> <CANCZdfpgUif9STteK=W3Pr0D9UqkPqU9edZqXLfLyoD5d=UPag@mail.gmail.com> <CAOtMX2iC9dqBmWHGODA%2BMg8caxeKP%2BtEGzGdXD48QaB0a9U5UQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/03/2017 14:38, Alan Somers wrote:
> On Wed, May 3, 2017 at 1:34 PM, Warner Losh <imp@bsdimp.com> wrote:
>> On Wed, May 3, 2017 at 1:32 PM, Alan Somers <asomers@freebsd.org> wrote:
>>> On Wed, May 3, 2017 at 12:16 PM, Ngie Cooper <yaneurabeya@gmail.com> wrote:
>>>>
>>>>> On May 3, 2017, at 10:21, Alan Somers <asomers@FreeBSD.org> wrote:
>>>>>
>>>>> Author: asomers
>>>>> Date: Wed May  3 17:21:01 2017
>>>>> New Revision: 317755
>>>>> URL: https://svnweb.freebsd.org/changeset/base/317755
>>>>>
>>>>> Log:
>>>>>  Various Coverity fixes in ifconfig(8)
>>>>
>>>> ...
>>>>
>>>>>  * Mark usage() as _Noreturn (1305806, 1305750)
>>>>
>>>> ...
>>>>
>>>>> -static    void usage(void);
>>>>> +static    void usage(void) _Noreturn;
>>>>
>>>> Hi Alan,
>>>>     Please use __dead2 instead to be consistent with legacy use of similar gcc attributes.
>>>> Thanks,
>>>> -Ngie
>>>
>>> Why not use _Noreturn?  It's standardized by C11, so tools understand
>>> it better than __dead2.
>>
>> Tools that can't understand #define __dead2 _Noreturn aren't worth supporting.
>>
>> Warner
> 
> Some tools don't expand preprocessor macros.  Like my editor, for
> example, which highlights _Noreturn as a keyword but not __dead2.

Please use _Noreturn, because it's standard.  sys/cdefs.h already
defines it appropriately for C < C11.

Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e93b38b5-6d1b-b463-ab50-b3f9ac2c4a17>