From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 7B1303858D32; Sun, 7 May 2023 17:33:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B1303858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1ab26a274d6so4900745ad.0; Sun, 07 May 2023 10:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683480823; x=1686072823; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=J4tFJIaABul7SeGYeMtXVejw2rjV6naW68jOqNmpvDw=; b=QRzqibZqDX/MCFecZR7wv63Cog96pUDwUHCjbHvbyL0y1RPB8x2CfU4ZSEZspj+gxj 0+h8GVwZKq9UZLCd725O2D8GLjHNw6nVOGfRI2bVPuSbh1TG6AB3EKvt3vligdu1zyDX RSWqftpIE63OIvXug8m6SLTe2N8apYVZgh2+OIBiFpA/4NwBXLBqeVqt8sThpBzCTEW5 mAHhvZ2IbauO6c+09e2CpTqagb8KGPLgtUQN1o6vwYTMPftjR8aTqy1S6tA1u3Gag5fB pUXG6rQWychW/rc/SpiBOJOKkJpMJdoF0e3Fx0rOu58UfpP4HjUMOyJzSOHJeE9/bWVX 3tPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683480823; x=1686072823; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J4tFJIaABul7SeGYeMtXVejw2rjV6naW68jOqNmpvDw=; b=gore+kd4cDC2L83Tk2wuJspAM3swgqhu2qYjattOA5eR5aBouXrRwQr5gTdXgYdfy5 FkEYn1FaOFyMLh0hFa6FRRBvw4UNiuak3MBZiwCnjEUKxaBN4HlfkmTsz2kLV08u3fUc f2wHz32DHnVWk5EGjJ6tSlusXG04KyaOJ1FjgbO1+xzW7aHI5aS6oAMZ8YkiV1EM4wqs PXZikX7EqtxvJXKqLIOAd8bJandGkKgu+fKJnlj/iOBVu4IzWYVGfDR/t+7jVdajYLH0 cdP025qtBf3ubKQsFjjSEAzBwG1JXyu3F86o71r7XpicNjt9yXmp0VZL7jF/aynMA50w IyQQ== X-Gm-Message-State: AC+VfDyG/5NhDchygfUVFkczHj0nxBC4YKxnOhK0fWS9x0hsdghOK5Yq GEvD7hK2Z9SgogEZjMzcLMQ= X-Google-Smtp-Source: ACHHUZ4WeFdKBpJE7YYzUKgdlFy3qySHIDEy+x+MYvXGMAf3aoywV+hJMCSOZ/35nLyo4Wj1BU2VTg== X-Received: by 2002:a17:902:d505:b0:1a6:b196:619d with SMTP id b5-20020a170902d50500b001a6b196619dmr9784849plg.6.1683480823306; Sun, 07 May 2023 10:33:43 -0700 (PDT) Received: from [192.168.1.20] ([50.37.188.226]) by smtp.gmail.com with ESMTPSA id 20-20020a631554000000b00520b677c645sm4729120pgv.41.2023.05.07.10.33.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 May 2023 10:33:42 -0700 (PDT) Message-ID: Date: Sun, 7 May 2023 10:33:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Harald Anlauf , sgk@troutmask.apl.washington.edu, gfortran Cc: gcc-patches References: <508ee742-97fa-9f61-ab65-98d3fa8e7dca@gmx.de> Content-Language: en-US From: Jerry D Subject: Re: [patch, fortran] PR109662 Namelist input with comma after name accepted In-Reply-To: <508ee742-97fa-9f61-ab65-98d3fa8e7dca@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/6/23 11:15 AM, Harald Anlauf via Fortran wrote: > 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. >> > As I think back, I don't recall ever seeing a semi-colon used after a NAMELIST name, so I think we should reject it always. The other "soft" blanks we should allow. I will make a another patch on trunk to reject the semi-colon and if no one objects here I will test and push it. Regards, Jerry