From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id 085D83858403; Sat, 30 Jul 2022 18:32:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 085D83858403 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.29] ([79.251.6.25]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MwfWU-1nYFxg38aQ-00y7gJ; Sat, 30 Jul 2022 20:32:42 +0200 Message-ID: Date: Sat, 30 Jul 2022 20:32:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH, v3] Fortran: detect blanks within literal constants in free-form mode [PR92805] Content-Language: en-US To: Thomas Koenig , fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Newsgroups: gmane.comp.gcc.fortran,gmane.comp.gcc.patches References: <46cc765d-469e-d6e8-23c5-dc470028d881@orange.fr> From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Ohu9MgBv5BDQ1xXeAsUzPbehb8LinYb3uS1BctvHnwLbCI8maIt VKZVNdDXAhKUU4dXc9A5g7onTejrqOgvZP/oo6JlKbLQXRno/408mRQE+KwP1g0eK6VqoJf c3RcbTiqMac9vgSDADx7zkwd9vA5aaCR8QCsLK+pJNOddbUAdvTQE7EzyNlebY/o3FbMeQw Q5L9u9JEqDaAH43cQNVxA== X-UI-Out-Filterresults: notjunk:1;V03:K0:Rr33Wa305bM=:VHzfkCi2P2POTQ+kxhg0aU IJqucqutE2xKduYj3XJrNPLxMPYNpOt8zzkh++1IZwZGORWoYnx8NX4pZk/Uh64OrzHIvql/7 mvHbxXoyQ1D7ycl1+7mHYE9ASIiTu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SIGNED, DKIM_VALID, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Sat, 30 Jul 2022 18:32:48 -0000 Hi Thomas, Am 30.07.22 um 09:46 schrieb Thomas Koenig via Fortran: > > Hi Harald, > >> This introduces the helper function gfc_match_next_char, which is >> your second option. > > I would be a little bit concerned about compilation times > with the additional function call overhead. the function it replaces (gfc_match_char) is also in a different file, thus the overhead is at least neutral. Given that the latter has an additional call to gfc_gobble_whitespace(), we actually get better... > The function is used only in one place; would it make > sense to put it into primary.cc and declare it static? Can do that. > Best regards > > =C2=A0=C2=A0=C2=A0=C2=A0Thomas > Thanks, Harald From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id CCB6A385840F for ; Sat, 30 Jul 2022 18:32:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCB6A385840F Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oHrGY-00066W-CL for fortran@gcc.gnu.org; Sat, 30 Jul 2022 20:32:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: fortran@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH, v3] Fortran: detect blanks within literal constants in free-form mode [PR92805] Date: Sat, 30 Jul 2022 20:32:38 +0200 Message-ID: References: <46cc765d-469e-d6e8-23c5-dc470028d881@orange.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US In-Reply-To: Cc: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, BODY_8BITS, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, 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: Sat, 30 Jul 2022 18:32:49 -0000 Message-ID: <20220730183238.v2J_kVe40aOBtOqcxH5zEdO82GS5VqDyp2_CQj-V9Cs@z> Hi Thomas, Am 30.07.22 um 09:46 schrieb Thomas Koenig via Fortran: > > Hi Harald, > >> This introduces the helper function gfc_match_next_char, which is >> your second option. > > I would be a little bit concerned about compilation times > with the additional function call overhead. the function it replaces (gfc_match_char) is also in a different file, thus the overhead is at least neutral. Given that the latter has an additional call to gfc_gobble_whitespace(), we actually get better... > The function is used only in one place; would it make > sense to put it into primary.cc and declare it static? Can do that. > Best regards > >     Thomas > Thanks, Harald