Re: pointer checking run time code

2005-09-19 Thread Robert Dewar
Florian Weimer wrote: Doesn't it eleminate too many checks, even? 8-/ Not that I know of And, to be absolutely honest, Ada only requires a small subset of all the checks that are required to make pointers completely safe. Once you use 'Unchecked_Access, Unchecked_Deallocation, or GNAT's 'Un

Re: pointer checking run time code

2005-09-18 Thread Florian Weimer
* Robert Dewar: > shreyas krishnan wrote: > >> Ideas, other pointers would be great > > Note that of course this kind of check is standard in Ada > and hence in GNAT, so you can get an idea from GNAT > generated code how well the backend can eliminate > such checks (answer: getting better with gcc

Re: pointer checking run time code

2005-09-17 Thread Mike Stump
On Saturday, September 17, 2005, at 10:13 AM, Mike Stump wrote: On Saturday, September 17, 2005, at 06:41 AM, shreyas krishnan wrote: I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. Just like mudflap? If so, use those option

Re: pointer checking run time code

2005-09-17 Thread Mike Stump
On Saturday, September 17, 2005, at 06:41 AM, shreyas krishnan wrote: I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. Just like mudflap? If so, use those options from the manual.

Re: pointer checking run time code

2005-09-17 Thread Robert Dewar
shreyas krishnan wrote: Ideas, other pointers would be great Note that of course this kind of check is standard in Ada and hence in GNAT, so you can get an idea from GNAT generated code how well the backend can eliminate such checks (answer: getting better with gcc 4).

pointer checking run time code

2005-09-17 Thread shreyas krishnan
Hi all, I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. As this might mean a lot of overhead, I was wondering where would be the best place to insert it so that the overhead can be opitimized away. Especially, I was wondering if an