Re: [IDEA+RFC] Possible solution for min()/max() war

Alex Bligh - linux-kernel (linux-kernel@alex.org.uk)
Fri, 31 Aug 2001 09:27:53 +0100


>># define __MIN(x,y) ({\
>> typeof(x) _x = x; \
>> typeof(y) _y = y; \
>> _x < _y ? _x : _y ; \
>> })
>
> How about typeof(__MIN(u, s)), given unsigned u, int s?

As this would expand to typeof({typeof(u) _u=u .... ? _u : _s;})
I am willing to bet it wouldn't even compile with either
version of min, so it doesn't matter.

--
Alex Bligh
-
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/