On 04/24/2014 04:33 AM, Richard Biener wrote:
On Wed, Apr 23, 2014 at 11:23 PM, Jeff Law <l...@redhat.com> wrote:
On 04/23/14 15:13, David Malcolm wrote:
On Wed, 2014-04-23 at 15:04 -0600, Jeff Law wrote:
On 04/21/14 10:56, David Malcolm wrote:
This updates all of the gimple_bind_* accessors in gimple.h from taking
a
plain gimple to taking a gimple_bind (or const_gimple_bind), with the
checking happening at the point of cast.

Various other types are strengthened from gimple to gimple_bind, and
from
plain vec<gimple> to vec<gimple_bind>.

[...]

This is fine, with the same requested changes as #2; specifically using
an explicit cast rather than hiding the conversion in a method.  Once
those changes are in place, it's good for 4.9.1.
Thanks - presumably you mean
    "good for *trunk* after 4.9.1 is released"
Right.  Sorry for the confusion.
Note I still want that less-typedefs (esp. the const_*) variants to be explored.
Changing this will touch all the code again, so I'd like to avoid that.

That is, shouldn't we go back to 'gimple' being 'gimple_statement_base'
and not 'gimple_statement_base *'?  The main reason that we have so
many typedefs is that in C you had to use 'struct foo' each time you
refer to foo as a type - I suppose it was then convenient to do the
typedef to the pointer type.  With 'gimple' being not a pointer type
we get const correctness in the way people would expect it to work.
[no, I don't suggest you change 'tree' or 'const_tree' at this point, just
gimple (and maybe gimple_seq) as you are working on the 'gimple'
type anyway].



So if we change 'gimple' everywhere to be 'gimple *', can we just abandon the 'gimple' typedef completely and go directly to using something like gimple_stmt, or some other agreeable name instead?

I think its more descriptive and then frees up the generic 'gimple' name should we decide to do something more with namespaces in the future...

Andrew

Reply via email to