From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([66.187.233.31]:56709 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S965000AbWJJMYI (ORCPT ); Tue, 10 Oct 2006 08:24:08 -0400 From: David Howells In-Reply-To: References: <20061006133414.9972.79007.stgit@warthog.cambridge.redhat.com> <20061006203919.GS2563@parisc-linux.org> <5267.1160381168@redhat.com> Subject: Re: [PATCH 1/4] LOG2: Implement a general integer log2 facility in the kernel [try #4] Date: Tue, 10 Oct 2006 13:23:34 +0100 Message-ID: <5167.1160483014@redhat.com> Sender: linux-arch-owner@vger.kernel.org To: Jan Engelhardt Cc: Kyle Moffett , Matthew Wilcox , torvalds@osdl.org, akpm@osdl.org, sfr@canb.auug.org.au, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-ID: Jan Engelhardt wrote: > Ouch ouch ouch. It should better be > > typedef uint32_t __u32; Actually, if you want to guarantee the size of an integer variable with gcc, you can do, for example, this: typedef int __attribute__((mode(SI))) siint; which creates a 32-bit signed integer type called "siint". The "mode" attribute is parameterised with one of the following values to indicate the specific size of integer required: QI 8-bit HI 16-bit SI 32-bit DI 64-bit TI 128-bit David