From: Joseph Myers <joseph@codesourcery.com>
To: Alex Colomar <alx.manpages@gmail.com>
Cc: <libc-alpha@sourceware.org>, Florian Weimer <fweimer@redhat.com>,
JeanHeyd Meneide <wg14@soasis.org>
Subject: Re: [PATCH] inttypes.h: imaxabs(3): Implement as a macro
Date: Tue, 13 Sep 2022 18:27:48 +0000 [thread overview]
Message-ID: <alpine.DEB.2.22.394.2209131820570.3083096@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20220913151853.153311-1-alx.manpages@gmail.com>
On Tue, 13 Sep 2022, Alex Colomar via Libc-alpha wrote:
> What do you think about using this implementation of imaxabs(3) in
> glibc? Is it valid according to ISO C and/or POSIX?
No. There has to be a prototype in the header for when #undef is used on
the macro definition.
Note that GCC expands imaxabs inline as a built-in function (unless using
-std=c90 or -fno-builtin etc.).
Note that C2x allows integer types wider than intmax_t in certain cases.
So there is no standard obstacle to providing int128_t and uint128_t and
having be fully integer types as defined in C2x, without needing to change
intmax_t - although appropriate syntax would be needed for INT128_C and
UINT128_C. (Changing intmax_t would be a pain because of the very large
number of printf-like functions in glibc, all of whose ABIs involve
intmax_t.)
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2022-09-13 18:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 15:18 Alex Colomar
2022-09-13 15:28 ` Alejandro Colomar
2022-09-13 15:34 ` Alejandro Colomar
2022-09-13 18:27 ` Joseph Myers [this message]
2022-09-13 18:47 ` Paul Eggert
2022-09-13 19:30 ` Joseph Myers
2022-09-13 20:59 ` Paul Eggert
2022-09-13 22:43 ` Alejandro Colomar
2022-09-13 22:56 ` Joseph Myers
2022-09-13 23:43 ` Alejandro Colomar
2022-09-14 16:41 ` Joseph Myers
2022-09-14 19:03 ` JeanHeyd Meneide
2022-09-15 12:33 ` Alejandro (Alex) Colomar
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=alpine.DEB.2.22.394.2209131820570.3083096@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=alx.manpages@gmail.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=wg14@soasis.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).