linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>, mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org, gcc@gcc.gnu.org
Subject: Re: [PATCH v2 1/4] system_data_types.7: Add int_leastN_t family of types
Date: Fri, 2 Oct 2020 10:35:22 +0200	[thread overview]
Message-ID: <f6711dc6-acd8-257d-811d-75aa4d4a60fe@gmail.com> (raw)
In-Reply-To: <b116e906-2a5d-1a7e-2969-52036ab3e8c3@cs.ucla.edu>

Hi Paul,

On 2020-10-01 19:38, Paul Eggert wrote:
 > On 10/1/20 7:35 AM, Alejandro Colomar via Libc-alpha wrote:
 >> +The narrowest signed integer type
 >> +of a width of at least N bits,
 >
 > Motivation is missing here. Why is there an int_leastN_t type at all?

Well, I'd say the motivation is for the standard to allow
unicorn implementations that have types that are not of normal widths
For example, this allows an implementation to have an int of 33 bits,
have int_least32_t be that int, and then not provide int32_t.

But, I'd say that writing this information in the man would only confuse
readers, would not be helpful because those are actually unicorns.

The few programmers that may need that info might better go to the standard.

 > Also, on all glibc platforms, int_leastN_t is equivalent to intN_t; this
 > should probably be mentioned.

We deliberately decided to not give any information on this.
Unless there's a strict requirement by the standard,
or there's some very good reason for it,
the programmer should treat typedefs as what they actaully are:
opaque types with some width, signedness and other requirements,
which we document here.

 >
 > Similarly for int_fastN_t.

Same as above.

Thanks,

Alex

  reply	other threads:[~2020-10-02  8:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 14:35 [PATCH v2 0/4] Document [u]int_leastN_t Alejandro Colomar
2020-10-01 14:35 ` [PATCH v2 1/4] system_data_types.7: Add int_leastN_t family of types Alejandro Colomar
2020-10-01 17:38   ` Paul Eggert
2020-10-02  8:35     ` Alejandro Colomar [this message]
2020-10-02 13:09       ` Jonathan Wakely
2020-10-01 14:35 ` [PATCH v2 2/4] int_least8_t.3, int_least16_t.3, int_least32_t.3, int_least64_t.3, int_leastN_t.3: New links to system_data_types(7) Alejandro Colomar
2020-10-01 15:26   ` Michael Kerrisk (man-pages)
2020-10-01 14:35 ` [PATCH v2 3/4] system_data_types.7: Add uint_leastN_t family of types Alejandro Colomar
2020-10-01 15:26   ` Michael Kerrisk (man-pages)
2020-10-01 14:35 ` [PATCH v2 4/4] uint_least8_t.3, uint_least16_t.3, uint_least32_t.3, uint_least64_t.3, uint_leastN_t.3: New links to system_data_types(7) Alejandro Colomar
2020-10-01 15:26   ` Michael Kerrisk (man-pages)

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=f6711dc6-acd8-257d-811d-75aa4d4a60fe@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=gcc@gcc.gnu.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 NNTP newsgroup(s).