From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Tue Dec  1 20:32:47 2026
Return-Path: <owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org>
X-Original-To: sc22wg14-domo2
Delivered-To: sc22wg14-domo2@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 1627C356ED7; Tue,  1 Dec 2026 20:32:47 +0100 (CET)
Delivered-To: sc22wg14@open-std.org
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
	by www.open-std.org (Postfix) with ESMTP id 9B498356EB9
	for <sc22wg14@open-std.org>; Tue,  1 Dec 2026 20:32:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1796153565;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type;
	bh=WPi3R2ibDbAk224z2Wu1Bh+7xhLe//7Z1DprD7M3/2I=;
	b=EqFsqoIY8+gLd5dfdMH0ewtqaQV9kHHuiFiW3luW+5XPWXrpFdaQWq+MdFzQ9XTxy/b8GY
	ketO7ImKsM+0mJIiptWV3Ti6lRjUxi+3Mr1BtROwOmtl58S64V9UfUZufWtxTAya0EVJg/
	fklQHEgJuCi6q89/SYvT3ktLSZe1MVk=
X-MC-Rep: binary re single
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
 [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-398-LQdzPvvfNKyKH9QG6aZ7Yg-1; Tue, 1 Dec 2026 19:32:42 +0000
X-MC-Unique: LQdzPvvfNKyKH9QG6aZ7Yg-1
X-Mimecast-MFC-AGG-ID: LQdzPvvfNKyKH9QG6aZ7Yg_1796153561
Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48df02b91f9so7285144f8f.1
        for <sc22wg14@open-std.org>; Tue, 01 Dec 2026 11:32:42 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796153561; x=1796758361;
        h=content-type:mime-version:message-id:subject:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=WPi3R2ibDbAk224z2Wu1Bh+7xhLe//7Z1DprD7M3/2I=;
        b=TDGWPitTi15Kgjd8oGb+QRHfawjrOaFhEcOd2BrUgDBQUxcR15QoUtmYZrJySsZ29E
         O7oyi6EjfUMYIr1m9Zy7OnBnv3/YfWwjOO+dNtcjDTf8I3xTs8Nz4VIrCekLpUvWwa2B
         Fkgt98I+7ZB4zdZoXsZt2xDoAXcC6Ri1c19Nx/vpoUNvc6FMIvrk0ydtnHxrmuQ6Bdo/
         wzjha4KzFfHF1tR71WjdCBY5T5zpqiCq5oiyealKhHmI8scaWNQBmCt1OIel073zRrjV
         3eRw2D9ODFnIpSLXnbIa6eDnUwL12TC1zTgQOZhNoCDT8cPhCY/ZPsYOtlBQT9HlDxAI
         yONg==
X-Gm-Message-State: APuU4Z/PwzAYaY4/Xi9sebn++TkTuLgNXKVKhwV2mrTr1rHtTtdEk8sB
	cstByubX01B5g4C5/U3m+dP7PwFoFvDe5C2xTEsbbmwhHswNvwmHQVlxloSpZLs6CrLo5c3fguf
	LWPLJrIQUfBSBXsFysm8/r0R8Uk5bNj3MgHM9QibFDKEX49ffwqfDl4vT+o2ckReAF8gdCvXt34
	Gpm/jcXEEmslI8fFSJZpYPhz+SjjUsjNn79MASud4Y
X-Gm-Gg: AZFdTZeg1QYVA7Ntts1U64w3RJeoma/2ZeFCGdCs2Teg+WhanYN8x9SiSfLdVrKgMju
	Gd/g5MSi1EmuqRe6fNMTczvFuR1WB2GKzS1dKny6tk8p/vS/odjR9vFVtzNlEA2LhtGmoIHKTxq
	81N9/HZ5QxVm7BLsWqoFnocUBbQDdmTqth4hiYFYqRmzov+LWeFQlxSyUYGjKbJB7421k50hc1G
	lBbz+EdmvTULtV7bpSzuM73HzPPZUdmLtTxIGskIDL3Iv/orUlnuU2UjMh7BBiYKF433sOiIeGR
	t1utpxPZTOohQGfZLREHEIpKtN7KKX5rDIPiah21QHutStRQmA5HaoY3Dr8lyluqEIfMTYYniTs
	G2ea+VtUU8bqKID2j3PUKoqx53ysqkgyQDesPDAlySbUU44CEiTYVgmPYDczzCVXm6NT0/5EYGG
	nfJiECgnSFrLJD9fMs+I8=
X-Received: by 2002:a05:600c:4e94:b0:4bb:b796:66f5 with SMTP id 5b1f17b1804b1-4bbb79667d8mr303462175e9.6.1796153561331;
        Tue, 01 Dec 2026 11:32:41 -0800 (PST)
X-Received: by 2002:a05:600c:4e94:b0:4bb:b796:66f5 with SMTP id 5b1f17b1804b1-4bbb79667d8mr303461865e9.6.1796153560842;
        Tue, 01 Dec 2026 11:32:40 -0800 (PST)
Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [81.187.227.50])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbb97e5356sm376082005e9.4.2026.12.01.11.32.40
        for <sc22wg14@open-std.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 01 Dec 2026 11:32:40 -0800 (PST)
Received: from jsm28 (helo=localhost)
	by digraph.polyomino.org.uk with local-esmtp (Exim 4.98.2)
	(envelope-from <josmyers@redhat.com>)
	id 1xYTah-00000007UGK-0Vdx
	for sc22wg14@open-std.org;
	Tue, 01 Dec 2026 19:32:39 +0000
Date: Tue, 1 Dec 2026 19:32:39 +0000 (UTC)
From: Joseph Myers <josmyers@redhat.com>
To: sc22wg14@open-std.org
Subject: Wording for issue 1037 and 1065 question 1 (noreturn)
Message-ID: <6665a7a7-7b0f-7d9c-c671-5c9ac9a89096@redhat.com>
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: YadDwv7FdHrggi5BfK-t3kDPprNq9tWitC5ZA5RMbcQ_1796153561
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=US-ASCII
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

I propose the following wording for issue 1037 (noreturn attribute), which 
also addresses question 1 from issue 1065.

Questions 2 and 3 from issue 1065 will hopefully be addressed mainly 
through Martin's planned paper to make it obsolescent to declare a library 
function yourself without including the corresponding header.  Given such 
a change, my inclination would be for the issue 1065 response then to say 
(a) the header behaves as if it declares standard library functions with 
the attributes shown in the standard (so that *after* including 
<stdlib.h>, it's valid to declare exit yourself with or without the 
attribute, for example), regardless of whether the header actually uses 
different syntax (such as the _Noreturn specifier) internally; (b) a 
manual declaration (obsolescent) without one from the header visible also 
needs to use [[noreturn]], even if no translation unit includes 
<stdlib.h>, as if a translation unit including the header were implicitly 
present.



### Suggested correction

Modify C23 6.7.13.7 (The `noreturn` and `_Noreturn` attributes):

> <del>The first declaration of a function shall specify the `noreturn`
> attribute if any declaration of that function specifies the
> `noreturn` attribute.  If a function is declared with the `noreturn`
> attribute in one translation unit and the same function is declared
> without the `noreturn` attribute in another translation unit, the
> behavior is undefined.</del>
> 
> <ins>If a function is declared with the `noreturn` attribute, then
> any other declaration of that function, in any translation unit,
> shall either specify the `noreturn` attribute, or be in a scope
> where a prior declaration of that function with the `noreturn`
> attribute is visible.</ins>

This change also addresses the first question in [issue
1065](issue:1065).

-- 
Joseph S. Myers
josmyers@redhat.com

