lkml.org 
[lkml]   [2001]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.9 does not compile [PATCH]
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/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.077 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site