public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: fortran@gcc.gnu.org
Subject: BOZ, F2008 and F2015, and future of gfortran
Date: Thu, 05 Oct 2017 21:10:00 -0000	[thread overview]
Message-ID: <20171005211023.GA67765@troutmask.apl.washington.edu> (raw)

Simply question.  Do people want gfortran to conform to
the F2008 and F2015 standards for boz-literal-constants?
Are people willing to let go of extension?

Consider

program boz
   implicit none
   integer(1) :: i = z'deadbeef'  ! Nonstandard initialization but
   integer(1) j                   ! accepted as-if initialized through
   data j/z'deadbeef'/            ! a data-stmt
   print *, i, j
end program boz

gfortran's current behavior with long lines wrap.

% gfortran6 -static -o z z.f90
z.f90:3:20:

    integer(1) :: i = z'deadbeef'
                    1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(1) at (1).
This check can be disabled with the option '-fno-range-check'
z.f90:6:13:

    print *, i, j
             1
Error: Symbol 'i' at (1) has no IMPLICIT type
z.f90:5:21:

    data j/z'deadbeef'/
                     1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(1) at (1).
This check can be disabled with the option '-fno-range-check'
A conforming version of

gfortran conforming to the F2008 and F2015 standards.
% gfcx -o z z.f90 && ./z
  -17  -17

-- 
Steve
20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4
20161221 https://www.youtube.com/watch?v=IbCHE-hONow

             reply	other threads:[~2017-10-05 21:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 21:10 Steve Kargl [this message]
2017-10-06  4:36 ` Jerry DeLisle
2017-10-06  5:02   ` Steve Kargl
2017-10-06  5:59     ` Richard Biener
2017-10-06  6:20       ` Steve Kargl
2017-10-06 11:50         ` Richard Biener
2017-10-06 17:03           ` Steve Kargl

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=20171005211023.GA67765@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    /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).