This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

pointer checking run time code


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 any optimization would hoist the check outside loops.
 Can I inline it and hope some code will get hoisted ? Or do I have to
do it explicitly ? The check is likely to be a function call that
checks the pointer values against some bounds.

Ideas, other pointers would be great 

Shrey


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]