From owner-freebsd-threads@FreeBSD.ORG Tue Dec 20 14:58:24 2011 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A2C41065673; Tue, 20 Dec 2011 14:58:24 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 468D28FC1C; Tue, 20 Dec 2011 14:58:23 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 9C43F5C34; Tue, 20 Dec 2011 14:58:22 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id pBKEwM4S078108; Tue, 20 Dec 2011 14:58:22 GMT (envelope-from phk@phk.freebsd.dk) To: "Niall Douglas" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 20 Dec 2011 14:34:54 GMT." <4EF09D0E.10213.B663FC80@s_sourceforge.nedprod.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 20 Dec 2011 14:58:22 +0000 Message-ID: <78107.1324393102@critter.freebsd.dk> Cc: threads@freebsd.org, arch@freebsd.org Subject: Re: [Patch] C1X threading support X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:58:24 -0000 In message <4EF09D0E.10213.B663FC80@s_sourceforge.nedprod.com>, "Niall Douglas" writes: >There's a LOT of optional stuff in C11. And then there are non-optional stuff like , specified so it leaves no doubt, except as to the sanity of the authors. As best I can gather, at one point ISO C decided to use '_' Uppercase Lowercase+digit+'_'* for keywords, and that begat us '_Complex', '_Alignas' (a famous greek poet ?), '_Generic'', and also '_Noreturn'. Then somebody probably pointed out that inline _Noreturn foo(int bar); just looked plain ugly. Then some smart person came up with which shall contain, exactly and only: #define noreturn _Noreturn So that we can write: #include inline noreturn foo(int bar); Now, explain to me, why this was more important, and got included, than being able to say: struct foo_protocol_header { little_endian uint16_t proto_ver @ 0, little_endian uint32_t seq_no @ 4, little_endian uint32_t ack_no @ 10, little_endian uint8_t proto_req @ 16, }; And have the compiler do the error-prone idiot-work for us, no matter which platform or compiler we use ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.