public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: sgk@troutmask.apl.washington.edu,
	Jerry D via Fortran <fortran@gcc.gnu.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran] PR109662 Namelist input with comma after name accepted
Date: Sat, 6 May 2023 20:15:39 +0200	[thread overview]
Message-ID: <508ee742-97fa-9f61-ab65-98d3fa8e7dca@gmx.de> (raw)
In-Reply-To: <ZFXRY1eNC4FJe2D8@troutmask.apl.washington.edu>

Hi Jerry, Steve,

I think I have to pour a little water into the wine.

The patch fixes the reported issue only for a comma after
the namelist name, but we still accept a few other illegal
characters, e.g. ';', because:

#define is_separator(c) (c == '/' ||  c == ',' || c == '\n' || c == ' ' \
                          || c == '\t' || c == '\r' || c == ';' || \
			 (dtp->u.p.namelist_mode && c == '!'))

We don't want that in standard conformance mode, or do we?

Cheers,
Harald

On 5/6/23 06:02, Steve Kargl via Gcc-patches wrote:
> On Fri, May 05, 2023 at 08:41:48PM -0700, Jerry D via Fortran wrote:
>> The attached patch adds a check for the invalid comma and emits a runtime
>> error if -std=f95,f2003,f2018 are specified at compile time.
>>
>> Attached patch includes a new test case.
>>
>> Regression tested on x86_64-linux-gnu.
>>
>> OK for mainline?
>>
>
> Yes.  Thanks for the fix.  It's been a long time since
> I looked at libgfortran code and couldn't quite determine
> where to start to fix this.
>


  reply	other threads:[~2023-05-06 18:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06  3:41 Jerry D
2023-05-06  4:02 ` Steve Kargl
2023-05-06 18:15   ` Harald Anlauf [this message]
2023-05-06 22:37     ` Jerry D
2023-05-07 17:33     ` Jerry D
2023-05-07 18:33       ` Harald Anlauf
2023-05-08  0:13         ` Steve Kargl
2023-05-08 19:03           ` Harald Anlauf
2023-05-12 20:36             ` Jerry D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508ee742-97fa-9f61-ab65-98d3fa8e7dca@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sgk@troutmask.apl.washington.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).