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 on valid code involving PARAMETERs initialized to intrinsic function result
Date: Tue, 09 Mar 2010 19:41:00 -0000	[thread overview]
Message-ID: <20100309194056.30550.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43310-18897@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from kargl at gcc dot gnu dot org  2010-03-09 19:40 -------
Don't use -pedantic.  It forces a symmetric range on
the integer type, [-huge():huge].  This can be checked
during constant folding, and NOT(A) is detected as an
error.  gfortran does not instrument the runtime code
for NOT(B), so it cannot detect that you are violating
the range of the pedantic integer type.  The GCC middle
end and back end do not enforce the symmetry of the range.

There was a long, long, long debate about this years ago
in the fortran@gcc.gnu.org mailing list.  See the archives
for details.


-- 


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


  reply	other threads:[~2010-03-09 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 19:06 [Bug fortran/43310] New: " giese025 at umn dot edu
2010-03-09 19:41 ` kargl at gcc dot gnu dot org [this message]
2010-03-09 20:45 ` [Bug fortran/43310] " 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
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

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=20100309194056.30550.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).