From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luc Van Oostenryck Subject: Re: [PATCH v2] implement constant-folding in __builtin_bswap*() Date: Wed, 23 Nov 2016 21:48:39 +0100 Message-ID: <20161123204838.GA14875@macpro.local> References: <20161117095503.8754-1-johannes@sipsolutions.net> <1479721551.8662.10.camel@sipsolutions.net> <20161122131543.GA8370@macbook.local> <20161122201650.GA12172@macpro.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:36579 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755533AbcKWUsv (ORCPT ); Wed, 23 Nov 2016 15:48:51 -0500 Received: by mail-wm0-f68.google.com with SMTP id m203so3102639wma.3 for ; Wed, 23 Nov 2016 12:48:42 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Christopher Li Cc: Johannes Berg , Linux-Sparse , Nicolai Stange On Wed, Nov 23, 2016 at 09:25:18AM +0800, Christopher Li wrote: > On Wed, Nov 23, 2016 at 4:16 AM, Luc Van Oostenryck > wrote: > > Work great here. > > > > If needed here is my > > Tested-by: Luc Van Oostenryck > There is a problem though, with non-constant args. Now the predeclarations of the 3 __builtin_bswap16/32/64 are gone, no more prototype and thus no more typing information. For example, if you call __builtin_bswap64() with an int argument, there is no way for the next steps to know the arg must first be 64 bit extended. Same for the result's type. Luc