[PATCH v2] Logical short circuiting with argument lists

Tom Tromey tom@tromey.com
Wed Sep 12 11:38:00 GMT 2018


>>>>> "Rich" == Rich Bunt <richard.bunt@arm.com> writes:

>> Though, another option is to do this in a fortran-specific way.

Rich> Are you able to provide some more details on this approach please?

Sure.  Each language provides its own evaluation function.  These
functions can change the interpretation -- or even, in collusion with
the language's expression parser the layout in memory -- of a given
opcode.  Most languages just defer to the generic evaluator.

E.g., look at rust-lang.c:rust_evaluate_subexp.  It changes UNOP_IND to
handle Rust trait objects, among other things.

Fortran doesn't have one of these as f_language_defn refers to
exp_descriptor_standard.

The whole expression data structure and approach is bad and should be
rewritten.

Anyway, doing this may be overkill, unless we think of some downside to
your approach.

Rich> However, if I had used a space between the array symbol name
Rich> and the parenthesizes this would have been a problem. This is
Rich> useful to know.

Yeah.  A bit subtle for my taste, I feel certain I'll break this rule by
accident.

Tom



More information about the Gdb-patches mailing list