From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randolph Chung Subject: Re: [parisc-linux] gcc (3.3.5) causing problems in our latest kernel. Date: Sun, 3 Apr 2005 17:43:47 -0700 Message-ID: <20050404004347.GG8921@tausq.org> References: <1112564457.5858.7.camel@mulgrave> <200504032343.j33NhqX2019108@hiauly1.hia.nrc.ca> Reply-To: Randolph Chung Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: James Bottomley , parisc-linux@lists.parisc-linux.org To: John David Anglin Return-Path: In-Reply-To: <200504032343.j33NhqX2019108@hiauly1.hia.nrc.ca> List-Id: parisc-linux developers list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: parisc-linux-bounces@lists.parisc-linux.org > > static inline void __test_width(char *var, int size) { > > switch (size) { > > case 1: > > case 2: > > case 4: > > case 8: > > *var++ = 0; > > break; > > default: > > bad_function(); > > } > > } > > I think the optimization of switch statements is far from optimal. > I suspect that the optimization of if statements is better. A similar > issue causes warning from __put_user in a 32-bit build. Probably, > this should be a GCC PR. Try changing that function to static inline void __test_width(char *var, const int size) { willy says it worked for him :) randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/ _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux