Hi Mikael, Am 29.07.22 um 13:11 schrieb Mikael Morin: > Hello, > > Le 28/07/2022 à 22:11, Harald Anlauf via Fortran a écrit : >> Dear all, >> >> in free-form mode, blanks are significant, so they cannot appear >> in literal constants, especially not before or after the "_" that >> separates the literal and the kind specifier. >> >> The initial patch from Steve addressed numerical literals, which >> I completed by adjusting the parsing of string literals. >> >> Regtested on x86_64-pc-linux-gnu.  OK for mainline? >> > It looks correct, but I think we should continue to have the free vs > fixed form abstracted away from the parsing code. yes, that makes sense. > So, I suggest instead to remove the calls to gfc_gobble_whitespace in > match_string_constant, Indeed, removing these simplifies the function and indeed works! > 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. > Mikael > I've attached a revised version with improved match_string_constant(). What do you think? Thanks, Harald