Re: macro conflict

From: Keith Owens (kaos@ocs.com.au)
Date: Fri Aug 24 2001 - 08:15:29 EST


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/



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:09 EST