[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-fortran
Subject: Re: [PATCH, v2] Fortran: detect blanks within literal constants in free-form mode [PR92805]
From: Mikael Morin <morin-mikael () orange ! fr>
Date: 2022-07-29 20:36:31
Message-ID: 46cc765d-469e-d6e8-23c5-dc470028d881 () orange ! fr
[Download RAW message or body]
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic