public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/18765] New: Illegal program not detected, "/=" when "=" is ambiguous
Date: Wed, 01 Dec 2004 20:26:00 -0000	[thread overview]
Message-ID: <20041201202653.18765.ludovic.brenta@insalien.org> (raw)

(Debian bug #283835)

package Test_133 is
   package pak1 is
      type T1 is null record;
   end pak1;

   package pak2 is
      subtype boolean is standard.boolean;
      function "=" (x, y: pak1.T1) return boolean;
   end pak2;

   use pak1, pak2;

   x1: pak1.T1;
   b1: boolean := x1 /= x1;     --ERROR: ambigous  (gnat misses)
   b2: boolean := x1 = x1;      --ERROR: ambigous
end Test_133;


The actual output from gnat is:

test_133.ads:15:22: ambiguous expression (cannot resolve ""="")
test_133.ads:15:22: possible interpretation at line 8
test_133.ads:15:22: possible interpretation in package Standard
gnatmake: "test_133.ads" compilation error

Only the second error is detected; the ambiguity of "/=" goes
unnoticed.

-- 
           Summary: Illegal program not detected, "/=" when "=" is ambiguous
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ludovic dot brenta at insalien dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


             reply	other threads:[~2004-12-01 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-01 20:26 ludovic dot brenta at insalien dot org [this message]
2004-12-02  0:08 ` [Bug ada/18765] " 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=20041201202653.18765.ludovic.brenta@insalien.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).