public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tobi at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/17872] New: gfortran accepts 255_1 as integer constant
Date: Wed, 06 Oct 2004 22:48:00 -0000	[thread overview]
Message-ID: <20041006224848.17872.tobi@gcc.gnu.org> (raw)

the following compiles without error:
integer*1 :: i1 = 255_1
integer*2 :: i2 = 65535_2
end

we're using signed integers, so this shouldn't happen. the reason is that
gfc_check_integer_range compares the integer against
gfc_integer_kinds[i].max_int which is 255 for kind 1, etc. not
gfc_integer_kinds[i].huge, which is 127 for kind 1 etc.

Changing this might break boz constants (e.g. z'ffffffff'), this has to be
investigated when creating a patch.

-- 
           Summary: gfortran accepts 255_1 as integer constant
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: minor
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobi at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


             reply	other threads:[~2004-10-06 22:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06 22:48 tobi at gcc dot gnu dot org [this message]
2004-10-07  1:59 ` [Bug fortran/17872] " pinskia 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=20041006224848.17872.tobi@gcc.gnu.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).