vmagnin / forcolormap

A Fortran library for colormaps
https://vmagnin.github.io/forcolormap/
MIT License
21 stars 4 forks source link

access='append' is a GNU extension #36

Closed vmagnin closed 7 months ago

vmagnin commented 7 months ago

When compiling with GFortran -std=f2018 options, access='append' is not accepted.

$ fpm build --flag "-Ofast -march=native -mtune=native -Wall -Wextra -std=f2018"
...
colormaps_info.f90                     failed.
[ 39%] Compiling...
build/dependencies/forcolormap/src/colormaps_info.f90:319:61:

  319 |             open(newunit=nunit, file=trim(file_name), access='append', status='unknown', action='write')
      |                                                             1
Error: GNU Extension: ACCESS specifier in OPEN statement at (1) has value ‘APPEND’
build/dependencies/forcolormap/src/colormaps_info.f90:338:61:

  338 |             open(newunit=nunit, file=trim(file_name), access='append', status='unknown', action='write')
      |                                                             1
Error: GNU Extension: ACCESS specifier in OPEN statement at (1) has value ‘APPEND’
...

Indeed, access should be sequential (default), direct or stream. We should use instead the specifier position='append':

open(newunit=nunit, file=trim(file_name), position='append', status='unknown', action='write')