lkml.org 
[lkml]   [2001]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.10-pre9 min/max raises "const" warnings

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/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.027 / U:4.572 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site