At 00:14 17/08/2001, Alan Cox wrote:
> > > The args and semantics of min/max changed to take
> > > a type first argument,
> >
> > They did? This three argument min is butt-ugly, not to mention a
> completely
> > original way of expressing the idea that is very much in conflict with
> every
> > other expression of min I have ever seen.
> >
> > What is wrong with using typeof? If you must have a three argument min,
> > could it please be called "type_min" of similar.
>
>It also doesnt solve all the cases.
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.
>Basically its just ensuring everyone doing portable code has to go and
>change all their macros to MIN and MAX instead.
Considering the patch removed all occurences of MIN/MAX with the new 3 arg
min/max macros it wouldn't seem that this would be accepted... )-:
Otherwise I would submit a patch to switch NTFS. I don't like this 3 arg
construct...
Best regards,
Anton
>Or use if statements, which with all the subtle suprises of type casting
>is actually often a far far better idea and probably should be encouraged
>a lot more in the kernel
-- "Nothing succeeds like success." - Alexandre Dumas -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/ ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/- 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