From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: tuhs-bounces@minnie.tuhs.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.1 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 46181d70 for ; Fri, 24 Aug 2018 16:59:18 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 9CA24A1B16; Sat, 25 Aug 2018 02:59:17 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 4C1F0A1A1A; Sat, 25 Aug 2018 02:59:09 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id EDFB7A1A1A; Sat, 25 Aug 2018 02:59:07 +1000 (AEST) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id 676A1A1A19 for ; Sat, 25 Aug 2018 02:59:07 +1000 (AEST) Received: by sdaoden.eu (Postfix, from userid 1000) id 2B05E1604A; Fri, 24 Aug 2018 18:59:06 +0200 (CEST) Date: Fri, 24 Aug 2018 18:59:38 +0200 From: Steffen Nurpmeso To: Derek Fawcus Message-ID: <20180824165938.V2naG%steffen@sdaoden.eu> In-Reply-To: <20180824132244.GA2979@accordion.employees.org> References: <10c401d43aef$8be34870$a3a9d950$@ronnatalie.com> <20180824132244.GA2979@accordion.employees.org> Mail-Followup-To: Derek Fawcus , 'TUHS' User-Agent: s-nail v14.9.11-22-g31cca803 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Subject: Re: [TUHS] C++ / Kernel X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 'TUHS' Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Derek Fawcus wrote in <20180824132244.GA2979@accordion.employees.org>: |On Thu, Aug 23, 2018 at 10:42:40AM -0400, ron@ronnatalie.com wrote: |> |>> Has anyone experimented with building Unix using C++, to take |>> advantage of strong typing? My guess is no--it would be a Herculean \ |>> task |> likely to introduce more bugs than it would fix. | |I recall that there was an attempt to do this with the Linux kernel, |but that it was abandoned before it was completed, this would have |been pre '98. Probably pre 2.4 Kernel. | |I have vague memories of discussions about it on the (kernel) mailing |list at the time, and that it was the original cause of the 'asmlinkage' |annotation on the C level syscalls - basically to turn off C++ name |mangling for when the assembler syscall table referenced the C routines. Also the often seen C paradigm of using "enum bla" in prototypes results in C++ compilation warnings/errors if the enum is actually used to define flags rather than a true enumeration, and there are not "bit enumerations" which would accomplish that. So you need to use an integer for the prototype and have lost all checking capabilities with a glance. I have never understood this deficiency. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)