Le 29/07/2022 à 21:59, Harald Anlauf via Fortran a écrit :

Am 29.07.22 um 13:11 schrieb Mikael Morin:

 > and use gfc_next_char instead of gfc_match_char
in get_kind.

There is one important functionality in gfc_match_char(): it manages
the locus.  We would need then to add this explicitly to get_kind,
which does not look to me like a big improvement over the present
solution.  Otherwise I get test regressions.

Indeed, I overlooked that, but my opinion remains that we shouldn’t play with fixed vs free form considerations here.
So the options I can see are:
- handle the locus in get_kind; we do it a lot already in matching functions, so it wouldn’t be different here.
 - implement a variant of gfc_match_char without space gobbling.
- use gfc_match(...), which is a bit heavy weight to match a single char string, but otherwise would keep things concise.

My preference goes to the third option, but I’m fine with either of them if you have a different one.

Reply via email to