From mboxrd@z Thu Jan 1 00:00:00 1970 From: Segher Boessenkool Subject: Re: [PATCH 1/2] Add C99-style constructor macros for specific-sized integers Date: Mon, 3 Mar 2008 21:23:34 +0100 Message-ID: <6d00362802813d8ed477b58ab218d03c@kernel.crashing.org> References: <4a8566f54ff84f498c5c0c0340076c296b1840e6@tazenda.hos.anvin.org> <7e0381d9932a37ad78f0c38b2a3c6a03@kernel.crashing.org> <47CB826A.7000202@zytor.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <47CB826A.7000202-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org> Sender: linux-arch-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: "H. Peter Anvin" Cc: Andrew Morton , Linus Torvalds , Linux Arch Mailing List , Linux Kernel Mailing List , David Brownell >> Do these new macros really buy anything over just writing LL in the >> few places that 64-bit constants are used? > > It gives you macros that matches the s64/u64 et al definitions are, > thus avoiding another class of spurious warnings. GCC doesn't warn for implicit narrowing that doesn't change value. The printk() example is a read herring IMHO, since variable arguments functions are "very speshul" anyway, and require explicit casts in many cases. Segher -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org ([63.228.1.57]:59877 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750875AbYCCUXt (ORCPT ); Mon, 3 Mar 2008 15:23:49 -0500 In-Reply-To: <47CB826A.7000202@zytor.com> References: <4a8566f54ff84f498c5c0c0340076c296b1840e6@tazenda.hos.anvin.org> <7e0381d9932a37ad78f0c38b2a3c6a03@kernel.crashing.org> <47CB826A.7000202@zytor.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <6d00362802813d8ed477b58ab218d03c@kernel.crashing.org> Content-Transfer-Encoding: 7bit From: Segher Boessenkool Subject: Re: [PATCH 1/2] Add C99-style constructor macros for specific-sized integers Date: Mon, 3 Mar 2008 21:23:34 +0100 Sender: linux-arch-owner@vger.kernel.org List-ID: To: "H. Peter Anvin" Cc: Andrew Morton , Linus Torvalds , Linux Arch Mailing List , Linux Kernel Mailing List , David Brownell Message-ID: <20080303202334.hNbsueA6Kaadci0cKrAhLNZ-YSdkKuys-7m1LePewj0@z> >> Do these new macros really buy anything over just writing LL in the >> few places that 64-bit constants are used? > > It gives you macros that matches the s64/u64 et al definitions are, > thus avoiding another class of spurious warnings. GCC doesn't warn for implicit narrowing that doesn't change value. The printk() example is a read herring IMHO, since variable arguments functions are "very speshul" anyway, and require explicit casts in many cases. Segher