-ftree-check for review

Sebastian Pop sebastian.pop@inria.fr
Wed Apr 18 14:37:00 GMT 2007


Hi,

On 4/18/07, Joe Buck <Joe.Buck@synopsys.com> wrote:
> This is interesting work, and I wouldn't have noticed it except that
> Tom Tromey linked to it from his blog.
>
> But I'm confused by something in the documentation for this patch (so
> maybe the doc is wrong):
>
> You write: "Note that patterns are tried only on the top level of a
> statement."  And later you write "for example the statement pattern
>
>  @code{"gets (%_)" or "%_ = gets (%_)"}
>
> matches any call to
>  @code{gets ()}.
>
> But the gets result might be passed straight to another function:
>
>     f(gets(arglist));
>
> presumably the rule would not match in this case, right?
>
> Is it possible to write an atomic pattern that matches any statement
> that contains a call to gets, at any level?
>

This should be matched as we're doing the pattern matching at the
gimple level.
The documentation should be improved to be more precise.

Sebastian



More information about the Gcc-patches mailing list