[PATCH 09/11] gdb/fortran: rewrite intrinsic handling and add some missing overloads
Tom Tromey
tom@tromey.com
Thu Apr 7 14:49:20 GMT 2022
>>>>> Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org> writes:
Thanks for the patch.
I found one minor problem in this one. You don't have to resubmit after
fixing it, though.
> After adding more overloads to the intrinsics handling, some of the
> operation names were no longer accurate. E.g. UNOP_FORTRAN_CEILING
> has been renamed to FORTRAN_CEILING as it is no longer a purely unary
> intrinsic function.
Eventually I'd like to get rid of this operator enum entirely, but it's
also fine to make the names more correct in the meantime.
> + case FORTRAN_LBOUND:
> + case FORTRAN_UBOUND:
> + pstate->push_new<fortran_bound_2arg>
> + (code, pstate->pop (), pstate->pop ());
I don't think you can rely on the order of evaluation here. (C++ did
change this, but after C++11, I think.) Instead you need to introduce
temporaries to control the ordering.
Tom
More information about the Gdb-patches
mailing list