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_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25363 invoked from network); 12 Mar 2023 07:40:06 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 12 Mar 2023 07:40:06 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 2BCBA413BE; Sun, 12 Mar 2023 17:40:00 +1000 (AEST) Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) by minnie.tuhs.org (Postfix) with ESMTPS id D559E413BD for ; Sun, 12 Mar 2023 17:39:46 +1000 (AEST) DKIM-Signature: a=rsa-sha256; b=wHcxZF+pn1jXuSHqfRk+f9d5mrQh8jqQbjhnagj5tBfSywUHVS7Zl1EWV0EPm7o7dCqAqrK71YlZ9afErenx52p9jc6/WavfYWdkAMd+GQ5vhpaA/Yd6tNBWSfqTj80YckNGxGdNK1U79o0XmIjcFBR8P8hLd/n6iCU1UDBc2Zb3G94QPFxhRY5poiQsd7wyekA/nf6bKBnE9fGGsjIQl8/S2V+BAELHto5p+PPaodO2GVTwPiUTBYxX6CvsbRiTXW3ay1iXfMR4l41I6JpdnyCYnVLQaXrEUz0agAFP5dYfOlhoVOjrk6Fq4v3H2eGrqfB6tb6p+iTz/PERR/0e6g==; s=purelymail2; d=pbrane.org; v=1; bh=hQ81BucCrEWBaJqV1J5SJmNsGSjLD12k8IiMI4woW9E=; h=Received:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=OgBR7hwmMv+zq91cyvKlQoVwD5ofz+t2PX+ZIesIrJPl8EHIMy8bB3IdwJTfDo5aLIlXf61uLHX2iCQht7w855LRQToruN0uGX6zqJ/N4qlG2dHr2SNkh0jwtHIL2/cgegBUWZZxb18VuLzLU3KjFev51lyO3x7/WdWYmvf/K3CTBWg+QNchFNVraVnZ7QcyizWpUhy4HNNZTzBSWh/w4rem5CRcLK53LUgxUa2aKfOtcT8gLe2/9Vu6/JHlivj/S0R7+hqJG1jMAT23EUWc9VVPZrQ7y2SLlVowEzLoqGWFxBOrY0TvPN9lixGuaRrbx3jzQRRhYTL2r9MxB2KmLw==; s=purelymail2; d=purelymail.com; v=1; bh=hQ81BucCrEWBaJqV1J5SJmNsGSjLD12k8IiMI4woW9E=; h=Feedback-ID:Received:From:To:Subject; Feedback-ID: 10987:2443:null:purelymail X-Pm-Original-To: tuhs@tuhs.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 286506020; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 12 Mar 2023 07:39:37 +0000 (UTC) Date: Sat, 11 Mar 2023 23:39:25 -0800 From: Anthony Martin To: Dan Cross Message-ID: References: <20230310113708.AD55518C080@mercury.lcs.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Message-ID-Hash: CQYR4LJSVGOBQWAHJR7WGW3ZYVL4TISG X-Message-ID-Hash: CQYR4LJSVGOBQWAHJR7WGW3ZYVL4TISG X-MailFrom: ality@pbrane.org 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@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: 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: Dan Cross once said: > I'm told that the plan9 C compilers were callee-save in part to keep > these state labels svelte. The Plan 9 compilers are caller-save. That means the labels only have to contain pc and sp. Waserror works well except for one small issue involving whether or not the compiler decides to store a value to a non-volatile, non-pointer variable when the value would not be used after a function call. As in: int a; a = 1; if(waserror()){ /* ... */ } a = 2; a = foo(a); The waserror branch may see a == 1 if foo errors. Ken's compilers are great, though. They don't engage in antisocial optimizations based on dubious notions of undefined behavior. I'd prefer my compiler to not elide explicit null checks or loads and stores from a pointer. Cheers, Anthony