lkml.org 
[lkml]   [2002]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Fix BUG macro
Date
In message <Pine.LNX.4.21.0205161154410.1036-100000@localhost.localdomain> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.080 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site