From: Paul Eggert <eggert@cs.ucla.edu>
To: Zack Weinberg <zack@owlfolio.org>
Cc: GNU libc development <libc-alpha@sourceware.org>
Subject: Re: Bad interaction between signal constants and -Wsign-conversion
Date: Mon, 27 Mar 2023 18:58:11 -0700 [thread overview]
Message-ID: <cf8fb4a4-4b01-f4e7-fc3e-3b942ed8879b@cs.ucla.edu> (raw)
In-Reply-To: <280b4afe-d080-4be5-a296-ec914b0b5439@app.fastmail.com>
On 3/27/23 18:23, Zack Weinberg via Libc-alpha wrote:
> # define SA_RESETHAND ((int)0x80000000) /* Reset to SIG_DFL on entry to handler. */
>
> Anyone got a better idea?
Perhaps this instead:
#define SA_RESETHAND (-1 - 0x7fffffff)
so that it is usable in preprocessor expressions. This is the sort of
thing that <limits.h> does for INT_MIN, and what
glibc/sysdeps/sparc/fpu/bits/fenv.h does for FE_UPWARD.
Are there other instances of 0x80000000 in user-visible glibc headers
that could cause similar problems?
next prev parent reply other threads:[~2023-03-28 1:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 1:23 Zack Weinberg
2023-03-28 1:58 ` Paul Eggert [this message]
2023-03-28 14:03 ` Cyril Hrubis
2023-03-28 14:53 ` Florian Weimer
2023-03-28 15:04 ` Andreas Schwab
2023-03-28 18:50 ` Florian Weimer
2023-03-29 0:08 ` Alejandro Colomar
2023-03-30 13:45 ` Zack Weinberg
2023-03-30 13:59 ` Vincent Lefevre
2023-03-30 14:09 ` Alejandro Colomar
2023-03-31 15:31 ` Vincent Lefevre
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=cf8fb4a4-4b01-f4e7-fc3e-3b942ed8879b@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=libc-alpha@sourceware.org \
--cc=zack@owlfolio.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).