From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50486 invoked by alias); 27 Apr 2017 18:24:43 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 50447 invoked by uid 89); 27 Apr 2017 18:24:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*M:stream, Casting X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Date: Thu, 27 Apr 2017 22:35:00 -0000 From: Mark Wielaard To: Ulf Hermann Cc: elfutils-devel@sourceware.org Subject: Re: [PATCH] Avoid signed/unsigned comparison Message-ID: <20170427182446.GD2061@stream> References: <1544575c-bba2-f196-3485-eb56b206b3d0@qt.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1544575c-bba2-f196-3485-eb56b206b3d0@qt.io> User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-q2/txt/msg00115.txt.bz2 On Thu, Apr 20, 2017 at 04:40:30PM +0200, Ulf Hermann wrote: > Some compilers implicitly cast the result of uint_fast16_t * > uint_fast16_t to something signed and then complain about the > comparison to (unsigned) size_t. Really? That is allowed? Using a signed type for uint_fast16_t? > Casting phnum to size_t is a good idea anyway as 16bit multiplication > can easily overflow and we are not checking for this. OK, that seems an ok enough reason. Applied to master. Thanks, Mark