From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by sourceware.org (Postfix) with ESMTPS id 5CBBF3858C27 for ; Mon, 11 Apr 2022 21:24:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CBBF3858C27 Received: by mail-yb1-xb34.google.com with SMTP id i20so8636680ybj.7 for ; Mon, 11 Apr 2022 14:24:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=csUFvywuV7Ectz/vGt2eO89sECwj7rQnLvB7Yjt4bns=; b=PDzF/NuQMKsEW2vP4B4h5Vsm2VAwiYjhAtEdc4fyhMMeWMCw1orsQcqk1g9Msh+V6h bXuhZ8aXmehmhhFXJAnleroeO8wp7DLG9S93lDVD/VKJ9mFAlKl4baLXxSvhHxwLUalH m9XkHjHQgV5lDI7s3oCG8mTvZbDbTgYpIpBcTRA8jy2/+kQ2PmQNXC3MmvfBZCIi5aiV brCDFABJphnvoxs5L2lKOvYGl9gk2/KlsH9LNra/RATlsSbR8cn2u/cIGvQMunpmUlYU 5ec39e4rxHc7dD8/i8u40Gm6mCk7y0ueM2x6RxB111OHV7ZnMOwf5f2l4arDt2inggte IGww== X-Gm-Message-State: AOAM53013WODt24jcurtHJbPCIB8J3MrzFkWCCbRlVMt8cbwfyoaJ1bI 9k5WC6vIctnv7PyBuFmTt99ued8vnaUtaIZTnRs= X-Google-Smtp-Source: ABdhPJzq/F/IuXjDJqXLbOwvev0F2RR0lneBkiooY8rL0ShMWnGw1PQgjDQ38wR5QCNI4UR1A7W4caurBou6l8f596c= X-Received: by 2002:a05:6902:91e:b0:621:b123:de46 with SMTP id bu30-20020a056902091e00b00621b123de46mr24255387ybb.76.1649712281787; Mon, 11 Apr 2022 14:24:41 -0700 (PDT) MIME-Version: 1.0 References: <20220411165835.4028009-1-goldstein.w.n@gmail.com> <9a1dd0bc-57cc-0fa7-0d61-1b9cbae247a0@cs.ucla.edu> In-Reply-To: <9a1dd0bc-57cc-0fa7-0d61-1b9cbae247a0@cs.ucla.edu> From: Noah Goldstein Date: Mon, 11 Apr 2022 16:24:31 -0500 Message-ID: Subject: Re: [PATCH v1] Replace {u}int_fast{16|32} with {u}int32_t To: Paul Eggert Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2022 21:24:43 -0000 On Mon, Apr 11, 2022 at 1:07 PM Paul Eggert wrote: > > On 4/11/22 09:58, Noah Goldstein via Libc-alpha wrote: > > - uint_fast16_t stack_flags = DEFAULT_STACK_PERMS; > > + uint32_t stack_flags = DEFAULT_STACK_PERMS; > > Doesn't this lose width info - or worse, add misleading info? For this > particular case it looks like we need 32 bits, when we don't. > > If we want to lose info, it'd be simpler to use plain 'int' and > 'unsigned int' for situations like these. That's less misleading. Assume you only meant replacing the {u}int_fast16_t with unsigned int if so fixed in v2. > > If we don't want to lose info, it'd be better to define private types > like glibc_uint_fast16_t and use these private types to address > efficiency concerns. > > I prefer losing the width info here, as this will cause less > bikeshedding in the future. But if we want to keep width info, surely we > should not make it more misleading.