Re: 2.4.10-pre9 min/max raises "const" warnings

From: J . A . Magallon (jamagallon@able.es)
Date: Fri Sep 14 2001 - 17:55:38 EST


On 20010914 Andreas Schwab wrote:
>Alexander Stohr <AlexanderS@ati.com> writes:
>
>|> i am yet not sure if the used "? :" operator set does qualify as
>|> a left-value.
>
>For Standard C it isn't, but for GNU C it is.
>

Perhaps it is nonsense, but, as the kernel already uses gcc-specific features,
the gcc folks could extend to C th '<?' and '>?' operators from C++, so

#define max(a,b) (a >? b)
#define min(a,b) (a <? b)

It works at least since 2.95.2. gcc3 warns about signs in -Wall mode.

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.1 (Cooker) for i586
Linux werewolf 2.4.9-ac10 #1 SMP Sat Sep 8 02:27:41 CEST 2001 i686
-
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 Sep 15 2001 - 21:00:50 EST