Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Phil Carmody Newsgroups: comp.lang.java.programmer,comp.lang.c Subject: Re: Arithmetic overflow checking Date: 10 Jul 2011 20:52:29 +0300 Organization: A noiseless patient Spider Lines: 22 Sender: phil@bazspaz.fatphil.org Message-ID: <87k4bq2fc2.fsf@bazspaz.fatphil.org> References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <2rydnez7l-H5BYnTnZ2dnUVZ_vGdnZ2d@earthlink.com> <9LWdnZH2hdfmyYvTnZ2dnUVZ_vidnZ2d@posted.palinacquisition> <3797038f-22d1-40b2-8c12-60db5a0976b8@t5g2000yqj.googlegroups.com> <4E19791F.3E45@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="A8KpN8k3FkxHwF32eOLgMA"; logging-data="15394"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BvRax9Zc1+KUoz4kyL2zu" User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Cancel-Lock: sha1:+GNBYp0d5ao3V3fZYoklNaWFZfA= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6053 comp.lang.c:8100 China Blue Dolls writes: > In article <4E19791F.3E45@mindspring.com>, pete wrote: > > China Blue Dolls wrote: > > > > > In C the array size is not part of the type or value, > > > so there is nothing to check. > > > > In C, > > the size of an array is part of the type of the array. One might even say that array types are characterized by their element type and by the number of elements in the array. > extern char s[]; That's not an array, that's a promise that somewhere else there's an array. Phil -- "At least you know where you are with Microsoft." "True. I just wish I'd brought a paddle." -- Matthew Vernon