Re: 2.4.9 does not compile [PATCH]

From: Jeff Dike (jdike@karaya.com)
Date: Thu Aug 16 2001 - 20:46:10 EST


aia21@cam.ac.uk said:
> Really? Could you point out an example where using ... typeof(x) __x;
> typeof(y) __y; ... in the macros wouldn't work? - I just tried a few
> examples I thought wouldn't work (side-effects ones) but I was
> pleasantly surprised to that gcc always produced the exact same
> assembler output for both the 3 arg and the 2 arg + typeof macros.

Try min(a, min(b, c)). Look at the cpp expansion and notice all the variable
name clashes.

We went through this on #kernel one night, and Alan concocted some amazingly
gross unique identifier generators as a result. To me, this looks like the
best way to do this.

                                Jeff

-
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 : Thu Aug 23 2001 - 21:00:19 EST