This is the mail archive of the 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: [PATCH 0/3] Compile-time gimple checking, without typedefs

On 05/05/14 02:22, Richard Biener wrote:

Also, AIUI, Andrew is looking at introducing concepts of gimple types and
gimple expressions, so "gimple" may no longer imply a *statement*.

Alternatively, we could make the base class be just "gimple" (which would
be more consistent with the names of the accessor functions).

I strongly prefer to name it 'gimple', not 'gimple_stmt'.  Because it's less
to type, and because it will make all other types shorter as well.  And because
'gimple' _is_ a stmt right now, so gimple_stmt is redundant.  Same applies
to gimple_stmt_with_FOO, just make it gimple_with_FOO.

I understand the namespace issue, but we don't have a namespace right now.
Also gimple::gimple works just fine, no?
But this approach is going to be inconsistent with Andrew's work, right? ISTM we'd end up with something like...

So statements would be "gimple"
types would be "gimple_type"
expressions would be "gimple_expr"

It's a bit of bikeshedding, but I'd prefer "gimple_stmt". If you really feel strongly about it, I'll go along without objection, but it seems wrong to me.

There's also the "bargain basement" namespaces approach, where we don't
have an implicit "gimple" namespace, but just *pretend* we do, and rename
the base type to "stmt", with e.g. "gimple_statement_phi" becoming just
"phi". ["gimple_switch" would need to become "switch_", say, to avoid the
reserved word].

Ick (for the 'switch' case ... CamelCase anyone? :)).
:-)  Please, no....


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