Finding Aliasing Bugs
Zack Weinberg
zackw@Stanford.EDU
Wed May 30 20:53:00 GMT 2001
On Wed, May 30, 2001 at 11:42:10PM -0400, dewar@gnat.com wrote:
> <<Unfortunately, even a warning like that would not catch the tricky
> cases where the aliasing is set up in one translation unit, but the
> code that breaks is in a different one.
> >>
>
> I fear that the warnings would indeed only catch the easy cases, and it is
> precisely the difficult ones of this kind that are the tough ones to catch.
Right. It becomes a serious interprocedural analysis problem, and GCC
has next to no infrastructure for that sort of thing - certainly not
between translation units.
Something like LCLint, which I believe does look at the entire
program, might be more capable of catching the hard bugs. Of course
every time I try to do anything with LCLint it dumps core on me and I
give up.
zw
More information about the Gcc
mailing list