lkml.org 
[lkml]   [2004]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sparse segfaults
Linus Torvalds wrote:
> So having
>
> int max_of_something;
> #define MAX_SOMETHING (0,max_of_something)
>
> is actually a nice way to make sure nobody does anything like
>
> MAX_SOMETHING = new;

When I want to do that I just use:

#define MAX_SOMETHING (max_of_something + 0)

When gcc accepts an arbitrary algebraic expression as an lvalue I'll be
impressed :-)

-Mitch
-
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 14:08    [W:0.141 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site