From owner-freebsd-current Mon Apr 3 9:22:17 2000 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 7130F37B60A for ; Mon, 3 Apr 2000 09:22:14 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id JAA15454; Mon, 3 Apr 2000 09:22:13 -0700 (PDT) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id JAA19715; Mon, 3 Apr 2000 09:22:09 -0700 (PDT) (envelope-from jdp@polstra.com) Date: Mon, 3 Apr 2000 09:22:09 -0700 (PDT) Message-Id: <200004031622.JAA19715@vashon.polstra.com> To: bright@wintelcom.net Subject: Re: MLEN and crashes In-Reply-To: <20000403023858.F21029@fw.wintelcom.net> References: <20000403084330.6A6DC483D@hcswork.hcs.de> <20000403023858.F21029@fw.wintelcom.net> Organization: Polstra & Co., Seattle, WA Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <20000403023858.F21029@fw.wintelcom.net>, Alfred Perlstein wrote: > > If you're worried about such things happening then you can use > the pre-processor to catch things that may make your structures > too large. > > > I wonder how too "big" can be detected. The code in question is perfectly > > valid syntactically and semantically correct C-code. > > There's code that #error (maybe #warning?) when it can detect that the > size of a struct has been unreasonably grown, it's done via the > pre-processor. I doubt if it's possible to implement that at compile time. Remember, the preprocessor doesn't understand "sizeof". It doesn't recognize keywords in expressions at all. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message