Re: sparse segfaults
From: Mitchell Blank Jr
Date: Mon Nov 22 2004 - 13:48:51 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/