This is the mail archive of the gcc@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: How to implement '@' GDB-like operator for libcc1


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> I have problems implementing '@' into GCC, could you suggest at which place
Jan> should I call build_array_type_nelts()?  Or is it the right way at all?

Jan> +    case ATSIGN_EXPR:
Jan> +      orig_op0 = op0 = TREE_OPERAND (expr, 0);
Jan> +      orig_op1 = op1 = TREE_OPERAND (expr, 1);
[...]
Jan> +      ret = build_array_type_nelts (TREE_TYPE (op0), tree_to_uhwi (op1));

It seems like there should be some kind of reference to &op0, that is,
lowering ATSIGN_EXPR to *(typeof(OP0)[OP1]*)(&OP0).

Also, I this has to consider the case where OP1 is not a constant.

Tom


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