This is the mail archive of the gcc-patches@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]

Re: -ftree-check for review


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


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