Re: macro conflict

Keith Owens (kaos@ocs.com.au)
Fri, 24 Aug 2001 23:15:29 +1000


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/