From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp02.smtpout.orange.fr [80.12.242.124]) by sourceware.org (Postfix) with ESMTPS id 02E523858424 for ; Fri, 29 Jul 2022 11:11:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 02E523858424 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([86.215.161.154]) by smtp.orange.fr with ESMTPA id HNu2oVK3va3C5HNu2oB374; Fri, 29 Jul 2022 13:11:34 +0200 X-ME-Helo: [192.168.1.17] X-ME-Auth: MDU4MTIxYWM4YWI0ZGE4ZTUwZWZmNTExZmI2ZWZlMThkM2ZhYiE5OWRkOGM= X-ME-Date: Fri, 29 Jul 2022 13:11:34 +0200 X-ME-IP: 86.215.161.154 Message-ID: Date: Fri, 29 Jul 2022 13:11:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] Fortran: detect blanks within literal constants in free-form mode [PR92805] Content-Language: en-US To: Harald Anlauf , fortran , gcc-patches References: From: Mikael Morin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 11:11:37 -0000 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. So, I suggest instead to remove the calls to gfc_gobble_whitespace in match_string_constant, and use gfc_next_char instead of gfc_match_char in get_kind. Mikael