From owner-svn-src-all@FreeBSD.ORG Sun Jun 21 15:42:00 2015 Return-Path: Delivered-To: svn-src-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DDD1E12; Sun, 21 Jun 2015 15:42:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 3E92F265; Sun, 21 Jun 2015 15:41:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 64BD5D61742; Mon, 22 Jun 2015 01:41:52 +1000 (AEST) Date: Mon, 22 Jun 2015 01:41:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pedro Giffuni cc: Bruce Evans , Dimitry Andric , David Chisnall , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r268137 - head/sys/sys In-Reply-To: <5586CBCE.2010608@FreeBSD.org> Message-ID: <20150622012426.S2603@besplex.bde.org> References: <201407020845.s628jRG5031824@svn.freebsd.org> <5BE3492F-86A0-4CE3-A27C-8DB5EB662C64@FreeBSD.org> <55842F16.5040608@FreeBSD.org> <20150620023835.N2562@besplex.bde.org> <55861046.4050501@FreeBSD.org> <20150621154332.U976@besplex.bde.org> <5586CBCE.2010608@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=jgUvnYShLB1bKa5NIEwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2015 15:42:00 -0000 On Sun, 21 Jun 2015, Pedro Giffuni wrote: > On 06/21/15 01:09, Bruce Evans wrote: >> On Sat, 20 Jun 2015, Pedro Giffuni wrote: >* ... >>> With the patch we would use: >>> >>> __Noreturn void >>> foo(void) _dead2; >>> >>> Which is still ugly but C11-ish. >> >> That asks for the same problems as defining __weak. >> >> Why not just don't use _Noreturn? It is an unimprovement on the gcc >> attribute. The attribute works at the beginning or end, while Noreturn >> only works at the end. > > As I see it, newer (C11) software is likely to use _Noreturn in their > headers We can define _Noreturn to support this (but possibly shouldn't). The newer software many be pure C11. Then it doesn't need any definition, and just doesn't compile with non-C11 compilers. If we defined _Noreturn, it would be to use it in non-C11 software, like we do in stdlib.h. This is a fragile compatibility hack so it should be avoided if possible. We can easily avoid it in our own headers by not changing anything. Just use the old declaration, with __dead2 placed at the end. Any reasonable implementation of __attribute__() must be able to support any new attribute that a new standard might add. Bruce