Re: linux/macros.h(new) and linux/list.h(mod) ...

From: David Woodhouse (dwmw2@infradead.org)
Date: Thu Jul 05 2001 - 18:08:55 EST


#define min(a,b) __magic_minfoo(a,b, __var##__LINE__, __var2##__LINE__)

#define __magic_minfoo(A,B,C,D) \
        ({ typeof(A) C = (A); typeof(B) D = (B); C>D?D:C; })

void main(void)
{
        int __var11=5, __var211=7;

        printf("min(%d,%d) = %d (should be 11: %d)\n", __var11, __var211, min(__var11, __var211), __LINE__);
}

--
dwmw2

- 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 : Sat Jul 07 2001 - 21:00:17 EST