From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) by sourceware.org (Postfix) with ESMTPS id 79ED93858D28 for ; Thu, 23 Nov 2023 09:07:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79ED93858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 79ED93858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.12.242.25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700730441; cv=none; b=nR9I8utBKRTjcgoYM73CkGMBG9Jw0sieuKm27MyS1U8DzR3KH1+ORD4yeNJAivHJkYl5vRTC5h2HZgbp3qPB7/dNLqMF9gZU577rPVf2SL8+u+1f7Q4uWGdBp2rhw6IG4V0XInN3OybSnvOS+gsQjJs/JKzdeXHp8X6Rq3UwzWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700730441; c=relaxed/simple; bh=3t2dVy6Pt4cLfdaZO0VJ+WddyObp78QmB6jpH4uajRE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=BoQcLw+5tuE9SWdGxGZ7spualp7H9rd4FouxeWUrihbz3EYPGDLkEikqs8So8tFm3kV7oTKF0pUrVd0zV3bD5gSjip5wqKERF/2mIqvQaAU5qW/2EeyhILf6cc7BQTgChpo4SyxpE+xKXUwvSl2Es4TuodXBfW7Rt2gwegVU3K8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [192.168.1.13] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id 65fzrKuYvgbbT65g4rp1FX; Thu, 23 Nov 2023 10:07:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1700730437; bh=GOYf7tVFSbwSC8xxTZCUtRtDrang5RLgeMHZf1nkobM=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=oyBzMdIA6ee++F54/ZAJzD6dR+a8/O/vceSS+czBqIlpeYSqO5J7ZudTmBGJP5Z2r 3dsoUObyI6JSyw8R0q/RnlGltRd55CGi9caSo+garfB/P65KfmzXvz/AT2oGSBHOs4 ynlT9WdlwdwwQb3gpPkZr4le95N5NCzrzaHmTZSa+f2kU9L0pAeyEAwbZWDkO2EA2p 59eNvH/7jM2q1mfrsBj78g0rk3xoF39OHz86hFJzMnsq5urvc5v027j6/dz600Bsna +dl3YSimbK69ZZW/FzmcefQged8347V1lQPrRcqzFSfMF79691vkhmpeI8aWK9AbZf IPu3Grw2GhJOw== X-ME-Helo: [192.168.1.13] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Thu, 23 Nov 2023 10:07:17 +0100 X-ME-IP: 86.215.161.51 Message-ID: <0396c862-7a97-4ef0-b133-4849d035add1@orange.fr> Date: Thu, 23 Nov 2023 10:07:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH, v4] Fortran: restrictions on integer arguments to SYSTEM_CLOCK [PR112609] To: Harald Anlauf , sgk@troutmask.apl.washington.edu Cc: fortran , gcc-patches References: <2898e351-eee8-45dd-a05d-0280378ba872@gmx.de> <84f48fee-a5b8-4bef-aa9b-f176d3cfbfa6@orange.fr> <06b5440b-fdab-4c02-988a-ea849aadfd48@gmx.de> <97809d56-b3dc-42c9-85e8-6eb8bc618428@orange.fr> <956bd0e6-d53d-4df9-b952-f441b7e3fac4@gmx.de> Content-Language: fr From: Mikael Morin In-Reply-To: <956bd0e6-d53d-4df9-b952-f441b7e3fac4@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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: Le 22/11/2023 à 21:36, Harald Anlauf a écrit : > Hi Mikael! > > On 11/22/23 10:36, Mikael Morin wrote: >> (...) >> >>> diff --git a/gcc/fortran/error.cc b/gcc/fortran/error.cc >>> index 2ac51e95e4d..be715b50469 100644 >>> --- a/gcc/fortran/error.cc >>> +++ b/gcc/fortran/error.cc >>> @@ -980,7 +980,11 @@ char const* >>>  notify_std_msg(int std) >>>  { >>> >>> -  if (std & GFC_STD_F2018_DEL) >>> +  if (std & GFC_STD_F2023_DEL) >>> +    return _("Fortran 2023 deleted feature:"); >> >> As there are officially no deleted feature in f2023, maybe use a >> slightly different wording?  Say "Not allowed in fortran 2023" or >> "forbidden in Fortran 2023" or similar? >> >>> +  else if (std & GFC_STD_F2023) >>> +    return _("Fortran 2023:"); >>> +  else if (std & GFC_STD_F2018_DEL) >>>      return _("Fortran 2018 deleted feature:"); >>>    else if (std & GFC_STD_F2018_OBS) >>>      return _("Fortran 2018 obsolescent feature:"); > > I skimmed over existing error messages, and since "forbidden" did > not show up and since "Not allowed" exists but not at the beginning > of a message, I found that > > "Prohibited in Fortran 2023" > > appeared to be a good alternative. > > Not being a native speaker, I hope that someone speaks up if this > is not appropriate.  And since I do not explicitly verify that part > in the testcase, it can be changed. > >>> diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h >>> index bdddb317ab0..af7a170c2b1 100644 >>> --- a/gcc/fortran/libgfortran.h >>> +++ b/gcc/fortran/libgfortran.h >>> @@ -19,9 +19,10 @@ along with GCC; see the file COPYING3.  If not see >>> >>> >>>  /* Flags to specify which standard/extension contains a feature. >>> -   Note that no features were obsoleted nor deleted in F2003 nor in >>> F2023. >>> +   Note that no features were obsoleted nor deleted in F2003. >> >> I think we can add a comment that F2023 has no deleted feature, but some >> more stringent restrictions in f2023 forbid some previously valid code. >> >>>     Please remember to keep those definitions in sync with >>>     gfortran.texi.  */ >>> +#define GFC_STD_F2023_DEL    (1<<13)    /* Deleted in F2023.  */ >>>  #define GFC_STD_F2023        (1<<12)    /* New in F2023.  */ >>>  #define GFC_STD_F2018_DEL    (1<<11)    /* Deleted in F2018.  */ >>>  #define GFC_STD_F2018_OBS    (1<<10)    /* Obsolescent in F2018.  */ >>> @@ -41,12 +42,13 @@ along with GCC; see the file COPYING3.  If not see >>>   * are allowed with a certain -std option.  */ >>>  #define GFC_STD_OPT_F95        (GFC_STD_F77 | GFC_STD_F95 | >>> GFC_STD_F95_OBS  \ >>>                  | GFC_STD_F2008_OBS | GFC_STD_F2018_OBS \ >>> -                | GFC_STD_F2018_DEL) >>> +                | GFC_STD_F2018_DEL | GFC_STD_F2023_DEL) >>>  #define GFC_STD_OPT_F03        (GFC_STD_OPT_F95 | GFC_STD_F2003) >>>  #define GFC_STD_OPT_F08        (GFC_STD_OPT_F03 | GFC_STD_F2008) >>>  #define GFC_STD_OPT_F18        ((GFC_STD_OPT_F08 | GFC_STD_F2018) \ >>>                  & (~GFC_STD_F2018_DEL)) >> F03, F08 and F18 should have GFC_STD_F2023_DEL (and also F03 and F08 >> should have GFC_STD_F2018_DEL). > > Well, these macros do an incremental bitwise-or, so the bit representing > GFC_STD_F2023_DEL is included everywhere.  I also ran the testcases with > different -std= options to check. > Ah, yes. I confused the GFC_STD_OPT* values with the GFC_STD_* ones. >> OK with this fixed (and the previous comments as you wish), if Steve has >> no more comments. >> >> Thanks for the patch. >> >> > > If there are no further comments, I will commit once I am able to > fully build again with --disable-bootstrap and -march=native ... > > Thanks, > Harald > Thanks again.