From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by sourceware.org (Postfix) with ESMTPS id 30C83385781A for ; Thu, 14 Apr 2022 00:46:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 30C83385781A Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-2ef5380669cso23424637b3.9 for ; Wed, 13 Apr 2022 17:46:23 -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=QPLgZ5t+5g6m5N+hyykio7jAy+NDPkBReG3sJqQ0MDo=; b=lDFgVhG4m3eeTHdtgjClmrPdiFeuV1BoAcPVxGe/5RT76Gp+7AZyQ9RMgyeY6fZ3fr zxZlgoMOARq6IggSQQGtWWn23yFqQel43EPxoYQCDshFNo5fn9EHlucbN1siBoo0nkAO 9KbGTGaMiBRnCk/o5QrW0ZwpI3naz76qYo8czxalzUkgoq5GDwJCxCd8VBpijecr82wy UNR/SDn8TvLpHvoqfl6MFeHG8SfnPazZvGeuGtl2YG5YAia7HoC1IWoDNgAElMQ+8dNf m8qoOv0lK4qsRbDZZR5II6SFzJT4/fQovIL7YNfHSK2Q2GjXGQMtQ10Xmm3aiADSUru1 siXQ== X-Gm-Message-State: AOAM532YSadBrpD+uSrtnvzLmwUUE4v4g4NGHTzQn8o8ipBPri03Av2P qTtvoDjUqpyknX2dxpJ4gnONlqer5p+oYUVkF/o= X-Google-Smtp-Source: ABdhPJyylergD8jV7vh9dU9ER6q2JYDChJVL6mp9PwENjY8BvHCXeyB/bSGKEA3TTdFxrDkKpxq4ODOWB98YoEmPuKg= X-Received: by 2002:a81:ad47:0:b0:2ee:927d:ff39 with SMTP id l7-20020a81ad47000000b002ee927dff39mr153105ywk.249.1649897182301; Wed, 13 Apr 2022 17:46:22 -0700 (PDT) MIME-Version: 1.0 References: <20220411165835.4028009-1-goldstein.w.n@gmail.com> <20220413235931.394191-1-goldstein.w.n@gmail.com> In-Reply-To: From: Noah Goldstein Date: Wed, 13 Apr 2022 19:46:11 -0500 Message-ID: Subject: Re: [PATCH v5] 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.6 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: Thu, 14 Apr 2022 00:46:24 -0000 On Wed, Apr 13, 2022 at 7:41 PM Paul Eggert wrote: > > On 4/13/22 16:59, Noah Goldstein via Libc-alpha wrote: > > - return h & 0xffffffff; Going to make this one uint32_t then as the name has meaning and we want a uint32_t at the end. > > + return h; > > Please omit this change, as the "& 0xffffffff" is needed on > (admittedly-hypothetical) hosts where unsigned int is wider than 32 > bits, which POSIX allows. Omitting this change shouldn't affect the > generated machine code on typical platforms. > > > - uint_fast16_t type; > > + uint16_t type; Fixed in v6. > > Since 'type' is compared to qtypes[i] which is 'short int', I suggest > using 'short int' here instead. > > Otherwise, looks good; thanks. > > A bigger cleanup would replace a lot of the 'uint32_t' stuff with > 'unsigned', as a good deal of the code seems to be written under the > mistaken assumption that int can be only 16 bits, but that's low priority.