Date: Mon, 3 Apr 2000 09:22:09 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: bright@wintelcom.net Cc: current@freebsd.org Subject: Re: MLEN and crashes Message-ID: <200004031622.JAA19715@vashon.polstra.com> In-Reply-To: <20000403023858.F21029@fw.wintelcom.net> References: <Pine.BSF.4.21.0004022118510.1442-100000@alphplex.bde.org> <20000403084330.6A6DC483D@hcswork.hcs.de> <20000403023858.F21029@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <20000403023858.F21029@fw.wintelcom.net>, Alfred Perlstein <bright@wintelcom.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004031622.JAA19715>