From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 904193858CDB for ; Thu, 18 Aug 2022 14:46:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 904193858CDB Received: by mail-wm1-x32c.google.com with SMTP id bd26-20020a05600c1f1a00b003a5e82a6474so1043667wmb.4 for ; Thu, 18 Aug 2022 07:46:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=+0N9TnqfoqfuScky+p+1EWMjzAZkKyXAyTMCOxBPhCc=; b=d/lhnNiHNncwrBWms6YZ+hSnWr8VU4cGAdm7ln2KGTPJtjFwoZHhRqUw9evurLhfzR Ms2tQkXK8iuBbzDw3LBA1exgKUpt4yoskdhsT9SeNVlRjo5VCFs52JwZw536G63Q8ir1 OxsKf2aLBvyl6H7rOH8j02NaUtsbzvcOzStWZracCnmc96/fUOlBDDIZG8fN4kIDDFHo ZgV8ZtBEgE7SOz3K+DhraTm6+5aX4i2qEG6iLE6zglP82t6QKEoWhGRR3tgzvUlJWayV yAri1LbU+MQkxHbFMqLiX4Fu6lP6mAf9JYuVFnl1B8RvgviGSHeertfDsAJM4JYO4h/G f/gA== X-Gm-Message-State: ACgBeo3ssJcYuX0ZCvO2aSRsVE8afJrpHDYk10PJTomG395DkwL07kvE juSkAYc0Px9Ogh+cfgSaj+N5Jg== X-Google-Smtp-Source: AA6agR4lC2ByktHYKlE951OScLxEbMg7sdImDEXQg2oP9GBOvGXf/4SseDuPovz6m6N6Xk1NhHDHxQ== X-Received: by 2002:a05:600c:3ac9:b0:3a5:f114:1f8 with SMTP id d9-20020a05600c3ac900b003a5f11401f8mr2068268wms.204.1660834017398; Thu, 18 Aug 2022 07:46:57 -0700 (PDT) Received: from arcturus.localnet ([2a01:cb10:8647:7500:603a:7837:893c:1da4]) by smtp.gmail.com with ESMTPSA id i16-20020adfefd0000000b0021dd08ad8d7sm1751935wrp.46.2022.08.18.07.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 07:46:56 -0700 (PDT) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: Richard Biener Cc: GCC Patches Subject: Re: [PATCH] Fix bogus -Wstringop-overflow warning in Ada Date: Thu, 18 Aug 2022 16:47:28 +0200 Message-ID: <3120260.5fSG56mABF@arcturus> In-Reply-To: References: <3184807.aeNJFYEL58@arcturus> <2251622.ElGaqSPkdT@arcturus> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2022 14:47:00 -0000 > Hmm :/ But that means we _should_ force a sign extension but only > from ptrofftype_p ()? That is, your test above should maybe read > > signop sgn = TYPE_SIGN (type); > if (ptrofftype_p (type)) > sgn = SIGNED; > > assuming 'type' is the type of lowbnd Yes, that's essentially equivalent to what get_offset_range does, but I'm not sure why having two slightly different ways of doing it would be better than a single one here, Maybe replace the call to get_precision in both places with TYPE_PRECSION (type) then? -- Eric Botcazou