bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Collin Funk <collin.funk1@gmail.com>
To: bug-gnulib@gnu.org
Subject: Re: limits-h: Fix BOOL_MAX value
Date: Mon, 12 Feb 2024 06:48:35 -0800	[thread overview]
Message-ID: <f558964d-b1c8-4f5b-8d8a-0ff1d1980e7f@gmail.com> (raw)
In-Reply-To: <5575962.44csPzL39Z@nimes>

On 2/12/24 5:09 AM, Bruno Haible wrote:
>   BOOL_WIDTH = 1, BOOL_MAX = 1
> with CC="gcc -std=gnu2x", but
>   BOOL_WIDTH = 8, BOOL_MAX = 1
> with CC="clang -std=gnu2x" (for all clang version 14 ... 17).

Same results with GCC 14 and Clang 19.

> Apparently I had misinterpreted the meaning of BOOL_WIDTH. (Cf.
> ISO C 23 § E.(3)).

Today I learned. I was under the impression that BOOL_WIDTH would be
the same as the underlying type (8-bit char for example). Am I
misreading or would this be a Clang bug? Both ISO C 23 § and
Annex E seem to say BOOL_WIDTH must be exactly 1. That would also make
the previous definition correct. :)

  reply	other threads:[~2024-02-12 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 13:09 limits-h: Fix BOOL_MAX value Bruno Haible
2024-02-12 14:48 ` Collin Funk [this message]
2024-02-12 16:25   ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f558964d-b1c8-4f5b-8d8a-0ff1d1980e7f@gmail.com \
    --to=collin.funk1@gmail.com \
    --cc=bug-gnulib@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).