Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!usenet.ins.cwru.edu!abvax!iccgcc!browns From: browns@iccgcc.decnet.ab.com (Stan Brown, Oak Road Systems) Newsgroups: comp.lang.c Subject: Re: Array bounds checking with C???? Message-ID: <619.26d6cfb2@iccgcc.decnet.ab.com> Date: 26 Aug 90 00:21:21 GMT References: <7611@ucdavis.ucdavis.edu> <26196@mimsy.umd.edu> Lines: 19 In article <26196@mimsy.umd.edu>, chris@mimsy.umd.edu (Chris Torek) writes: (in response to aa query about array-bounds checking in C) > There is a company called Saber that produces a product called > Saber-C that does this and more. It works quite well, although last > I had heard it still objected to `&arr[sizeof arr/sizeof *arr]', > which is Officially Legal. Just to stick in my $.02: int arr[4]; sizeof arr/sizeof *arr is 4, so &arr[4] may not be legal. Whether legal or not, the address is certainly outside the array. Stan Brown, Oak Road Systems, Cleveland, Ohio, U.S.A. (216) 371-0043 The opinions expressed are mine. Mine alone! Nobody else is responsible for them or even endorses them--except my cat Dexter, and he signed the power of attorney only under my threat to cut off his Cat Chow!