From owner-svn-src-head@freebsd.org Fri Aug 21 06:16:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F30979BF951; Fri, 21 Aug 2015 06:16:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 B5BA5167A; Fri, 21 Aug 2015 06:16:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (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 45EEA1FE023; Fri, 21 Aug 2015 08:16:29 +0200 (CEST) Subject: Re: svn commit: r286170 - head/share/man/man9 To: John-Mark Gurney References: <201508020022.t720MFqp023071@repo.freebsd.org> <20150802145434.V1128@besplex.bde.org> <55C09869.2040605@selasky.org> <20150804171051.GL78154@funkthat.com> Cc: Ed Schouten , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <55D6C291.2080606@selasky.org> Date: Fri, 21 Aug 2015 08:17:53 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150804171051.GL78154@funkthat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 21 Aug 2015 06:16:32 -0000 On 08/04/15 19:10, John-Mark Gurney wrote: > Hans Petter Selasky wrote this message on Tue, Aug 04, 2015 at 12:48 +0200: >> My gut feeling is it's good practice to have those wrapper macros >> because they isolate the compiler into a consistent and coherent API. > > Except that we now have a consistent and coherent API w/ > _Static_assert... We emulate this function on all compilers (or at least > try to, see bde's other email about issues w/ the ifdef mess), and > is available to both userland and kernel... It will also be available > on other platforms, as opposed to having to port our CTASSERT macros > to other platforms and introduce #ifdef's to make it compatible... > >> Wouldn't the argument be the same for queue.3 . Once C-compilers finally >> decide to compile time support queues, we should throw queue.3 aswell? >> I'd say it is better to stay independent of what the compiler guys will >> come up with next, reminding me how hard it was to upgrade a machine >> recently from 9- to 10- because of C++11 .... > > Last I checked, they don't change their API's ever revision of the > langauge... > > Comparing this to C++11? Just wow, see above how this is properly > covered by the ifdef mess in sys/cdefs.h for all compilers, this won't > introduce any complications like the C++11... > Hi, Here is one more argument against using "_Static_assert()": According to "http://en.cppreference.com/w/c/language/_Static_assert" _Static_assert is C11 syntax only, and we compile the kernel using "-std=iso9899:1999" according to "conf/kern.mk:CFLAGS" in -current. So technically it shouldn't work, and it throws up compile errors with certain other C tools I'm using at work which are more strict than clang. Any comments? --HPS