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

J . A . Magallon (jamagallon@able.es)
Sat, 15 Sep 2001 00:55:38 +0200


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/