From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125391 invoked by alias); 17 Apr 2017 14:34:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 125374 invoked by uid 89); 17 Apr 2017 14:34:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:373, HX-HELO:sk:zimbra., H*r:sk:zimbra., H*RU:sk:zimbra. X-HELO: zimbra.cs.ucla.edu Subject: Re: [PATCH v2] Add reallocarray function. To: Florian Weimer , =?UTF-8?Q?Dennis_W=c3=b6lfing?= Cc: libc-alpha@sourceware.org References: <20170410150053.10208-1-denniswoelfing@gmx.de> <20170417140148.23212-1-denniswoelfing@gmx.de> <874lxnf6jw.fsf@mid.deneb.enyo.de> From: Paul Eggert Message-ID: <66ddc86f-f3ea-0738-e4fd-7461582ef0ee@cs.ucla.edu> Date: Mon, 17 Apr 2017 14:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <874lxnf6jw.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-04/txt/msg00288.txt.bz2 On 04/17/2017 07:32 AM, Florian Weimer wrote: > * Dennis W=C3=B6lfing: > >> +static inline bool >> +check_mul_overflow (size_t l, size_t r, INTERNAL_SIZE_T *result) >> +{ >> +#if __GNUC__ >=3D 5 >> + return __builtin_mul_overflow (l, r, result); > This is not correct for size_t !=3D INTERNAL_SIZE_T. Why not? Could you give an example?