public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/43310] -pedantic errors involving PARAMETERs and out of range result
Date: Sat, 13 Mar 2010 03:52:00 -0000	[thread overview]
Message-ID: <20100313035203.31734.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43310-18897@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from kargl at gcc dot gnu dot org  2010-03-13 03:52 -------
(In reply to comment #8)
> Maybe we just need to document that -pedantic changes the range of integers to
> be what the Fortran standard requires (a symmetric range).

The Fortran Standard requires neither a symmetric nor asymmetric
range.  It simply requires that a program(mer) cannot invoke an
intrinsic procedure that will return an out-of-range value.

program one
  integer i
  i = not(1)
end program one

is a valid Fortran 95 program if INTEGER has the range [-huge()-1:huge()]
(assuming a twos complement system). If the range is, however,
[-huge():huge()], then it is an invalid program.  Guess what happen
when the stupid option -pedantic is used?  It changes the range, and this
behavior is completely conforming.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43310


  parent reply	other threads:[~2010-03-13  3:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 19:06 [Bug fortran/43310] New: -pedantic errors on valid code involving PARAMETERs initialized to intrinsic function result giese025 at umn dot edu
2010-03-09 19:41 ` [Bug fortran/43310] " kargl at gcc dot gnu dot org
2010-03-09 20:45 ` dominiq at lps dot ens dot fr
2010-03-09 21:06 ` kargl at gcc dot gnu dot org
2010-03-10  1:17 ` giese025 at umn dot edu
2010-03-10  3:15 ` kargl at gcc dot gnu dot org
2010-03-10 16:07 ` giese025 at umn dot edu
2010-03-10 17:17 ` kargl at gcc dot gnu dot org
2010-03-13  1:18 ` [Bug fortran/43310] -pedantic errors involving PARAMETERs and out of range result pinskia at gcc dot gnu dot org
2010-03-13  3:52 ` kargl at gcc dot gnu dot org [this message]
2010-03-17 20:16 ` burnus at gcc dot gnu dot org
2010-03-17 21:31 ` dominiq at lps dot ens dot fr
2010-03-17 22:20 ` kargl at gcc dot gnu dot org
2010-03-17 22:27 ` kargl at gcc dot gnu dot org
     [not found] <bug-43310-4@http.gcc.gnu.org/bugzilla/>
2010-11-03 17:34 ` kargl at gcc dot gnu.org
2013-07-01 20:41 ` dominiq at lps dot ens.fr
2015-10-10  8:39 ` dominiq at lps dot ens.fr

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=20100313035203.31734.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).