From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18227 invoked from network); 13 Mar 2023 16:00:14 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2023 16:00:14 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id EF7074154E; Tue, 14 Mar 2023 02:00:09 +1000 (AEST) Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by minnie.tuhs.org (Postfix) with ESMTPS id 54BA24154D for ; Tue, 14 Mar 2023 02:00:05 +1000 (AEST) Received: by mail-pf1-x431.google.com with SMTP id c4so7962007pfl.0 for ; Mon, 13 Mar 2023 09:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678723205; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VLOMUREulS4gJXIBolMtcBmmmVh5gLDl3Xd5uyH7sys=; b=R/op6iWMHU8AEHxojNrwggI0EVfha7yaayHNoW8hXQImm/7CKflGuRXjlJvx0yEiL5 gAti/UwAdUGgzmm4oDG8SaE5t9Izc7d+bED17CzwyqBcVAm5X5kXDQla9jSNELMMFSmQ 1u7Oe9n51Mhv0VPH+QK7m9TCFe9ak4c23mQmB2oEQeTT6sXdxaSxGGvsanDDOEfMebwH foX4wJdoq/v6Yml5QyFASJ4vWW9L9r57T4w3IStZE3Ge5lO5C7qnhEYXrb2odp82u7qb mtd75NwHLBrv0TXNiDak3C0Ss7Gpe4RUTQ69c87AvUKFVLwknE1ZyIQ3al6CYaS0W5yq q/lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678723205; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VLOMUREulS4gJXIBolMtcBmmmVh5gLDl3Xd5uyH7sys=; b=SbH6u3cSdJw6HvXYBapRR9ohtzA+cLHUMgvl+tsF6Rlu0BzVvGptxL3kwqtZPApPo8 GVD4S0WkwES7k+rWUVCLrjXD0YFJHINtkwaBFcEa4cJt9zji7dia16OT6hq2skuv86Xw ldY2bW9PMXZ4MBjk/h8fImUyRRbPbOIceOskwH5li5S6QfLwFs+dQ5+y6r45BYbD/1JI TY4fyplkKacqJ6dEO4MdZ/NAJegr9ymR+fDeXCORkCJmm7g+tMw0OGklF8lHZ25SHCmd VTQtDGwzARc1wQ3OQjTrrZksN1Xr6l/koByX/MJxRLlQAnLT7GNV8ZN0tONWX15dOj/S bXTw== X-Gm-Message-State: AO0yUKVRkZx3kEJJxa4lNVv/XXQBG/0ZLn4MWPlAmDouCL4nyyh+TRwF lfpZ7waEryDDfqcarWLpRzB6KPeCiK3G2wnaT9dek1IU X-Google-Smtp-Source: AK7set9lPFPiNv6xewGwQow6DeA8tzZRK/Na5x741lVriU1KgJEB4fNJZxV/WRhvfL2eueYy+fpXcp4I6v8vCcAMz5Y= X-Received: by 2002:a65:5307:0:b0:502:f4c6:305e with SMTP id m7-20020a655307000000b00502f4c6305emr11784024pgq.7.1678723204707; Mon, 13 Mar 2023 09:00:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:ed0c:b0:3bc:b7f6:895e with HTTP; Mon, 13 Mar 2023 09:00:04 -0700 (PDT) In-Reply-To: References: <20230310113708.AD55518C080@mercury.lcs.mit.edu> From: Paul Winalski Date: Mon, 13 Mar 2023 12:00:04 -0400 Message-ID: To: Alejandro Colomar Content-Type: text/plain; charset="UTF-8" Message-ID-Hash: 7NCHD5MOXRPR6J3A4C2FL44XHGNT2CQH X-Message-ID-Hash: 7NCHD5MOXRPR6J3A4C2FL44XHGNT2CQH X-MailFrom: paul.winalski@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: TUHS X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: [TUHS]: C dialects (was: I can't drive 55: "GOTO considered harmful" 55th anniversary) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 3/13/23, Alejandro Colomar wrote: > > Well, it depends on what you call "C". There are many dialects, > and I'm not sure there's any which I'd call "C". > > The 3 main dialects are "ISO C", "GNU C", and "K&R C". And then > there are subdialects of them. We could say "C" is "ISO C", since, > well, it's _the_ standard. Note that the goal of a programming language standards committee is very different from the goal of those who use the language. The committee's goal is to standardize existing practice of the language in a way that is implementable on the widest range of hardware and OS platforms, and to provide a controlled way to add language extensions. The goal of users is to get their job done. The advantage of programming in strict ISO C is that the resulting code will run just about anywhere. If you don't care about that (and I'd wager most programmers don't) then ignore the standard. > But then, ISO C shares the aliasing > issues that GNU C has, so by avoiding the GNU C compiler you're > not avoiding the issues we're talking about; moving to a compiler > that only talks ISO C is going to keep the issues. You'll need > a compiler that talks K&R C, or some other dialect that doesn't > have aliasing issues. As someone pointed out, the three things that most programmers value are execution speed, execution speed, and execution speed. Aliasing issues greatly hamper what a modern optimizing compiler can do and still generate semantically correct code. > At that point, since you already need a subdialect of C, GCC is > one such compiler, since it provides a comprehensive set of flags > to tune your dialect. All the best commercial optimizing compilers do that these days. It's a way of having your semantic cake and being able to eat it (fast execution speed), too. -Paul W.