After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793123 - Bring into accordance with Fortran 2003/2008
Bring into accordance with Fortran 2003/2008
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-02 15:06 UTC by Adam Hirst
Modified: 2018-02-07 10:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bring into accordance with F2003 and F2008 [v2] (11.63 KB, patch)
2018-02-02 15:06 UTC, Adam Hirst
none Details | Review
Bring into accordance with Fortran 2003 and 2008 [v3] (11.82 KB, patch)
2018-02-02 16:03 UTC, Adam Hirst
none Details | Review
Implement missing ISO_FORTRAN_ENV intrinsic procedures (837 bytes, patch)
2018-02-02 16:08 UTC, Adam Hirst
none Details | Review
Add missing IMPURE keyword (752 bytes, patch)
2018-02-02 16:15 UTC, Adam Hirst
none Details | Review
Fix storage_size typo (799 bytes, patch)
2018-02-02 16:23 UTC, Adam Hirst
none Details | Review
[Fortran] Bring into accordance with F2003 and F2008 [v4] (12.17 KB, patch)
2018-02-02 16:30 UTC, Adam Hirst
committed Details | Review

Description Adam Hirst 2018-02-02 15:06:58 UTC
Created attachment 367818 [details] [review]
Bring into accordance with F2003 and F2008 [v2]

Initially submitted to https://github.com/GNOME/gtksourceview/pull/18

Attached to this Ticket is an updated (v2) patch which takes into account comments raised on the Github PR.

If there's anything else I should do, please don't hesitate to get in touch.
Comment 1 Adam Hirst 2018-02-02 15:20:25 UTC
It seems there's an issue with the .patch, resulting from the edits/updates I made to it. I will try to resolve this.

Otherwise, unless there are any keywords, intrinsic functions, or attributes I missed, the only other thing I can see to do would be to add the list of intrinsic constants to the intrinsic function array, as is done by Code::Blocks.

https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
Comment 2 Al Thomas 2018-02-02 15:33:12 UTC
Review of attachment 367818 [details] [review]:

Unfortunately patch does not apply with git apply --unidiff-zero. Requested git formatted patch.
Comment 3 Adam Hirst 2018-02-02 16:03:55 UTC
Created attachment 367824 [details] [review]
Bring into accordance with Fortran 2003 and 2008 [v3]

This version of the patch should now successfully apply. In the process, I corrected a number of foolish misformattings, and also added another handful of single-token `end*` statements which are valid Fortran.
Comment 4 Adam Hirst 2018-02-02 16:08:40 UTC
Created attachment 367825 [details] [review]
Implement missing ISO_FORTRAN_ENV intrinsic procedures
Comment 5 Adam Hirst 2018-02-02 16:11:41 UTC
In addition to https://bugzilla.gnome.org/show_bug.cgi?id=793123#c1 a feature proposal could be an extra keyword category for the INTRINSIC MODULEs and their contained constants. The current "intrinsics" category is clearly only intended for intrinsic *procedures*.

https://gcc.gnu.org/onlinedocs/gfortran/Intrinsic-Modules.html
Comment 6 Adam Hirst 2018-02-02 16:15:51 UTC
Created attachment 367830 [details] [review]
Add missing IMPURE keyword

It's not my day today. I totally forgot about the IMPURE keyword. The longer you stare at the same lists, the harder it becomes to stop the differences.
Comment 7 Adam Hirst 2018-02-02 16:23:47 UTC
Created attachment 367831 [details] [review]
Fix storage_size typo
Comment 8 Adam Hirst 2018-02-02 16:30:00 UTC
Created attachment 367832 [details] [review]
[Fortran] Bring into accordance with F2003 and F2008 [v4]

Squashed together.
Comment 9 Al Thomas 2018-02-02 16:43:44 UTC
Review of attachment 367832 [details] [review]:

Looks good to me:
 - patch applies
 - "do concurrent" is now before "do", otherwise the space causes "do" to match before "do concurrent", as discussed on IRC
 - formatting and XML elements look correct

I've not checked each keyword is correct, I'm not a Fortran expert, but a sample check shows them to be fine. The submitter has checked them against their existing code base and discussed on IRC.
Comment 10 Sébastien Wilmet 2018-02-07 10:34:09 UTC
Al: thanks for the review. And thanks for the patch Adam.

I've pushed the patch to the master branch:
commit ae0a821a4a1a715f7244ce7fcbd4d5fb25baaaa7

The *.lang file will be synced to GtkSourceView 3 in the near future.