public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Tobias Burnus <tobias@codesourcery.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	fortran <fortran@gcc.gnu.org>
Subject: Re: [Patch] Fortran: Accept -std=f2023 support, update line-length for Fortran 2023
Date: Thu, 16 Nov 2023 20:30:32 +0100	[thread overview]
Message-ID: <750b022e-0291-4d35-9cd1-0957023cbb4a@gmx.de> (raw)
In-Reply-To: <ce3c556f-a63e-4328-bab3-6530126f5187@codesourcery.com>

Hi Tobias,

On 11/16/23 14:01, Tobias Burnus wrote:
> This adds -std=f2023, which is mostly a prep patch for future changes.
>
> However, Fortran 2023, https://j3-fortran.org/doc/year/23/23-007r1.pdf
> changes two things which is taken
> care in this patch:
>
> (A) In "6.3.2.1 Free form line length":
>
> Fortran 2018: "If a line consists entirely of characters of default kind
> (7.4.4), it shall contain at most 132 characters"
> Fortran 2023: "A line shall contain at most ten thousand characters."
>
> (B) In "6.3.2.6 Free form statements":
> Fortran 2018: "A statement shall not have more than 255 continuation
> lines."
> Fortran 2023: "A statement shall not have more than one million
> characters."

this is really a funny change: we're not really prepared to handle
this.  According to the standard one can have 999999 lines with only
"&" and then an ";", but then only 100 lines with 10000 characters.

There is a similar wording for fixed-form which you overlooked:

6.3.3.5 Fixed form statements

Fortran 2023: "A statement shall not have more than one million characters"

Please adjust the fixed-form limits in your patch.

If you think that we need testcases for fixed-form, add them,
or forget them.  I don't bother.

> I have not added a testcase for exceeding the latter but otherwise there
> are new
> tests and I had to add a couple of -std=f2018 to existing tests.
>
> Comments, suggestions, approval?

I have the following comments:

- there are existing testcases continuation_5.f, continuation_6.f,
   thus I suggest to rename your new continuation_{5,6}.f90 to
   continuation_17.f90+ .

- I don't understand your new testcase line_length_14.f90 .
   This is supposed to test -std=gnu, but then -std=gnu is not a
   standard but a moving target, which is why you had to adjust
   existing testcases.
   So what does it buy us beyond line_length_1{2,3}.f90 ?

> Tobias
>
> PS: I find it funny that -std=c23, -std=c++23 and -std=f2023 will get
> added in the same GCC release.

:-)

> PPS: I did not bother adding .f23 as file extension; I believe that also
> .f18 is unsupported.

I never use extensions other than .f90 for portable code.

With the above fixed, I am fine with your patch.

Thanks,
Harald

> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201,
> 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer:
> Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München;
> Registergericht München, HRB 106955


  reply	other threads:[~2023-11-16 19:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 13:01 Tobias Burnus
2023-11-16 19:30 ` Harald Anlauf [this message]
2023-11-17 11:38   ` [Patch] Fortran: Accept -std=f2023, update line-length for Fortran 2023 (was: [Patch] Fortran: Accept -std=f2023 support, update line-length for Fortran 2023) Tobias Burnus
2023-11-17 12:06     ` [Patch] Fortran: Accept -std=f2023, update line-length for Fortran 2023 Mikael Morin
2023-11-17 19:07     ` Harald Anlauf
2024-01-02 19:31     ` Harald Anlauf
2024-01-02 19:37       ` Steve Kargl
2024-01-02 19:51         ` Harald Anlauf
2023-11-17  3:38 ` [Patch] Fortran: Accept -std=f2023 support, " 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=750b022e-0291-4d35-9cd1-0957023cbb4a@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tobias@codesourcery.com \
    /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).