From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 16 May 2002 20:28:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 16 May 2002 20:28:46 -0400 Received: from [202.135.142.194] ([202.135.142.194]:10507 "EHLO wagner.rustcorp.com.au") by vger.kernel.org with ESMTP id ; Thu, 16 May 2002 20:28:44 -0400 From: Rusty Russell To: Hugh Dickins Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix BUG macro In-Reply-To: Your message of "Thu, 16 May 2002 12:21:44 +0100." Date: Fri, 17 May 2002 10:31:41 +1000 Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org In message you write: > On Thu, 16 May 2002, Rusty Russell wrote: > > > Replaces filename with object name. Sure, it's not as canonical, but > > it means that ccache works across different directories (at the > > moment, ccache gets almost no caceh hits when you compile in a > > different dir). > > __STRINGIZE(KBUILD_BASENAME) sounds good, except in inline > function from header file; perhaps that's why you're adding > __FUNCTION__, which will waste a lot of space. Um, show me where sizeof(KBUILD_BASENAME) + sizeof(__FUNCTION__) > sizeof(__FILENAME__). > Suggest you > should test __INCLUDE_LEVEL__: use __STRINGIZE(KBUILD_BASENAME) > at __INCLUDE_LEVEL__ 0, __FUNCTION__ at included levels? That'd be cute. Of course best would be using KBUILD_BASENAME (which means BUG() in a header works correclty) and make BUG() take a string arg. Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell.