Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262216AbUKVSpN (ORCPT ); Mon, 22 Nov 2004 13:45:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262338AbUKVSjr (ORCPT ); Mon, 22 Nov 2004 13:39:47 -0500 Received: from gaz.sfgoth.com ([69.36.241.230]:49642 "EHLO gaz.sfgoth.com") by vger.kernel.org with ESMTP id S262315AbUKVShr (ORCPT ); Mon, 22 Nov 2004 13:37:47 -0500 Date: Mon, 22 Nov 2004 10:39:56 -0800 From: Mitchell Blank Jr To: Linus Torvalds Cc: Jan Engelhardt , Linux Kernel List Subject: Re: sparse segfaults Message-ID: <20041122183956.GA50325@gaz.sfgoth.com> References: <20041120143755.E13550@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.2.2 (gaz.sfgoth.com [127.0.0.1]); Mon, 22 Nov 2004 10:39:56 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 624 Lines: 23 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/