From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id D74F53858D39 for ; Tue, 28 Mar 2023 01:58:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D74F53858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 007453C026D4F; Mon, 27 Mar 2023 18:58:12 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7afCCMTim5cb; Mon, 27 Mar 2023 18:58:11 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A93863C00ED41; Mon, 27 Mar 2023 18:58:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A93863C00ED41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1679968691; bh=HP7loypICOZrtWgQXzbdjrdQ+WgnOfUTvuDccmcyrFM=; h=Message-ID:Date:MIME-Version:To:From; b=WNAbZrcWqUteyjriYf7byaStVOQnE0VeVeMvmKfqAaKo973QbKW7es6Z7kuGfBu17 vKu9vp9EVKJ4XRa4kIeWQsBFUzLZbS9RMFXXMy46wyilHjR0N+ltTnqM7UJnbsRQzW FHEg/DEM3n0DeE4mx3yWB2zByJqbw7BT2BkSZyUo5Uryd6WHHTEXi87h/4b/oh5O0L 5Qovi7lKdBQT4ibWtdft+Obu62jvAQCydx79etxeQaDZ83sSH1ISVeKww0I84/nCUB uHl58vdki+bbeLEuxR+A2hEI0W01FWfakSr3IwbKnNV29kCEkx1oy9xbk09PVMq3lj PeCbROnRkk0dg== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dugkMznCHBdP; Mon, 27 Mar 2023 18:58:11 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 8D73A3C0140A2; Mon, 27 Mar 2023 18:58:11 -0700 (PDT) Message-ID: Date: Mon, 27 Mar 2023 18:58:11 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: Bad interaction between signal constants and -Wsign-conversion Content-Language: en-US To: Zack Weinberg References: <280b4afe-d080-4be5-a296-ec914b0b5439@app.fastmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Cc: GNU libc development In-Reply-To: <280b4afe-d080-4be5-a296-ec914b0b5439@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 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?