Question on gimplify.c:create_tmp_var

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Sun Jun 6 19:32:00 GMT 2004


    It seems to me that this is best represented using a temporary structure
    internal to the compiler, r1_prime, which is has the maximum size of r1
    and contains a single field of type r1.  

There is actually is such a type. 

    No muss, no fuss, no disgusting things happening with lvalue casts.
    Further, it seems to me that it preserves the original language type
    system better than whatever you've been doing before.

No, it goes the other way and goes against the type system of the language.

In Ada, *objects* have subtypes, but operations always have the base types.
It gets somewhat confusing when you think of references (the equivalent
of COMPONENT_REF) because those are *names* in Ada), but the most effective
way to handle the myriad of cases that come up in the language is to, as
much as possible, convert each expression to its base type.

We did try it the other way and it ended up as major mess.  Remember, I'm
just giving you the most straightforward example here!



More information about the Gcc mailing list