lkml.org 
[lkml]   [2001]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: macro conflict
Date
On Fri, 24 Aug 2001 14:03:34 +0100, 
David Woodhouse <dwmw2@infradead.org> wrote:
>#define min(x,y) ({ if strcmp(STRINGIFY(typeof(x)), STRINGIFY(typeof(y))) BUG(); realmin(x,y) })

Did you try that? Firstly typeof() is only defined in declaration
context, it gets an error when used in an expression. Secondly
typeof() is not expanded by cpp so the stringify tricks do not work.
typeof(x) is handled by cc, not cpp.

-
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 12:58    [W:0.103 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site