From owner-sc22wg14+sc22wg14-domo2=www.open-std.org@open-std.org  Thu Feb 12 22:37:48 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 3411E356D4C; Thu, 12 Feb 2026 22:37:48 +0100 (CET)
Delivered-To: sc22wg14@open-std.org
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
	by www.open-std.org (Postfix) with ESMTP id 945FE35697F
	for <sc22wg14@open-std.org>; Thu, 12 Feb 2026 22:37:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1770932265;
	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=W4mqPeWqQZ3jcg04oWTsslS9KLyC+EVZE91nCotgZCw=;
	b=b1aGC9vJ7nQzG8KcfI1rOSDspdvUycfsVZfCFF3OqFhyha4p7tIb/1G0ENIGWiyoj0JVxF
	4NUrwhpB1niiYyR782m25PbwVXoZMqtwdtwJiRw+96LwLM7xuURGOmaDYQzNrDiSKv2ryl
	XW5mOPGELlpQsA7r2E5hGZwv6U4LzlQ=
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-185-B4l39ienNFGNGTPS4rzuMw-1; Thu, 12 Feb 2026 16:37:44 -0500
X-MC-Unique: B4l39ienNFGNGTPS4rzuMw-1
X-Mimecast-MFC-AGG-ID: B4l39ienNFGNGTPS4rzuMw_1770932263
Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-435ab9ed85dso182563f8f.1
        for <sc22wg14@open-std.org>; Thu, 12 Feb 2026 13:37:43 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1770932262; x=1771537062;
        h=mime-version:message-id:subject:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
        bh=W4mqPeWqQZ3jcg04oWTsslS9KLyC+EVZE91nCotgZCw=;
        b=f6/e3i5EDp0STSh36xNisYfTmfrio/dM87vlCFa8TtQAjBh9VGw2xQUUjWNfgREaIM
         aliaguzoggabSP53TD/TzRIDeL0JYwPwjlShGNYN2doW8X2UudKWDKj55MBT0rUscL7n
         KF9nWH1uHrECShKYLNXpxHNsNUhIdzWJC66dZ3q+JszXzs7b9YRIffcSwdjnUOYTDtLS
         TJ69t+uafLzGc4+YiJSv7jo8XuTFfqMQ2Y1BgzrFtQGxBF7isPSosdDe2UU24okqhNXJ
         QKLcjFKEABb8j+Ps7BuDCkJMLhCYMS4Ocgyn4JarFu3L+y8CCYDL/YYRedErsPVdcooH
         /fqg==
X-Gm-Message-State: AOJu0YyFSejtOUf2bcRUqp9mCbp7uLy1m2/CZnPXSjS6jlSBdO/elS3e
	29Cxkajb54MRDehZkcmokvpFJ1oGNFL0SlWn14oxrarHH8ePX7+vbCiGa6I76kcy9HY0Frc7wBu
	HAZPowUY7saBcPlOFE3AEvhEfXHpNida5gZMyLQ9zXaMlt04YYJl4CDLinscovbK2S8k7bax224
	3qmCTwWGrKtmbMw/zgFWKVJZnUWGcbT6TZuH4nzsl+
X-Gm-Gg: AZuq6aLgHoO4LCm0Jwv4P8u90c3uj/2r/9fz7D8G67/6tYY7th7j2hoTVEi0/iQdx59
	OL6/n9SQBnxS3uap8Yhxnh6Nf1Kzuf5ws0HJEfuqyS+5ZLmijOGmT6NlXVI7HokG8L5Db+Yz6Bz
	/iOZrr9IOyl5vJdbhzmFBN0ZenN1b5gE0Uf/337nt4dw8R7BZagZ8Ph/LQCVaynrUERguVoIg7d
	evdVbmZADwmW92vpLKtaQyOU5A8UvPBN9frcPdKj83ZNUhw6f5fd99WWxoHOubt1EW7BIIzWmyB
	vasFHELJM/BT3XxogO/dA7cnGnIUaqkxhK3Kz3k9TEPBBQIZd0hqzNpPESLqbmcPoYUR6H8bO6A
	YWX7ZncxsG5eZHXeFANIiY4673j7mKN9n9IG3JG8Uva/zOOjoHjdV
X-Received: by 2002:a05:6000:2407:b0:437:6dac:458a with SMTP id ffacd0b85a97d-43796b06b59mr527146f8f.57.1770932262510;
        Thu, 12 Feb 2026 13:37:42 -0800 (PST)
X-Received: by 2002:a05:6000:2407:b0:437:6dac:458a with SMTP id ffacd0b85a97d-43796b06b59mr527105f8f.57.1770932261938;
        Thu, 12 Feb 2026 13:37:41 -0800 (PST)
Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332])
        by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43796ad015bsm555566f8f.38.2026.02.12.13.37.40
        for <sc22wg14@open-std.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 12 Feb 2026 13:37:41 -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 1vqeNY-000000019Us-01MC
	for sc22wg14@open-std.org;
	Thu, 12 Feb 2026 21:37:40 +0000
Date: Thu, 12 Feb 2026 21:37:39 +0000 (UTC)
From: Joseph Myers <josmyers@redhat.com>
To: sc22wg14@open-std.org
Subject: Integer promotions wording (issue 1021)
Message-ID: <de198d9f-72af-c81d-152b-4f7171b569e2@redhat.com>
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: 5eZ5dFUPkZevTaF_QG_HtuN86w0IkOkQo8j_i4vvavc_1770932263
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=US-ASCII
Sender: owner-sc22wg14@open-std.org
Precedence: bulk

Here is some proposed wording for issue 1021, making the integer 
promotions convert all enumerations to their underlying type.

The existing wording for integer promotions is awkward in that it has a 
sentence about bit-precise bit-fields, relevant even to those wider than 
int, in the middle of text that's otherwise about conversions to int or 
unsigned int, so requiring "If the original type is not a bit-precise 
integer type" in the following sentence.  Rather than adding an extra 
such exception about enumerated types, it seems clearer to rearrange the 
description in the form of a sequence of conversions:


The *integer promotions* are the following sequence of conversions, 
applied to certain kinds of expressions where specified in their 
respective subclauses.  Each conversion is applied in turn if the type 
resulting from the previous conversions satisfies the given conditions.

* If the expression has enumerated type, it is converted to the underlying 
type of the enumeration.

* If the expression after the previous conversion is a bit-field of a 
bit-precise integer type (6.2.5), it is converted to the corresponding 
bit-precise integer type. [put existing footnote 50 here]

* If the type resulting from the previous conversions is a bit-precise 
integer type, no further conversions are applied as part of the integer 
promotions.

* If the expression after the previous conversions:

  - has an integer type (other than int or unsigned int) whose integer
  conversion rank is less than or equal to the rank of int and unsigned 
  int; or

  - is a bit-field of type bool, int, signed int, or unsigned int

  then:

  - if an int can represent all values of the original type (as restricted 
  by the width, for a bit-field), the value is converted to an
  int;

  - otherwise, it is converted to an unsigned int.

All other types are unchanged by the integer promotions.

(Keep the existing NOTE.)

[Note: conversion from enumerations comes before conversion of bit-precise 
bit-fields so that if bit-precise enums (N3705) are accepted and an 
implementation allows bit-fields declared with such a type then the 
integer promotions result in the declared bit-precise underlying type.]

In 6.3.2.8 Usual arithmetic conversions, change "Otherwise, if any of the 
two types is an enumeration, it is converted to its underlying type. Then, 
the integer promotions are performed on both operands." to "The integer 
promotions are performed on both operands.".

-- 
Joseph S. Myers
josmyers@redhat.com

