comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <no.spam@no.spam.com>
Subject: GNAT bug?
Date: Fri, 27 Oct 2006 09:57:03 +0200
Date: 2006-10-27T09:57:03+02:00	[thread overview]
Message-ID: <ehse4f$c5p$1@cernne03.cern.ch> (raw)

Hi,

Consider this example code:

procedure Protected_Test is

    protected type P is
       entry E;
    end P;

    protected body P is
       entry E when True is
       begin
          null;
       end E;
    end P;

    Pr : P;

begin
    Pr.E;
end Protected_Test; :

and then:

$ gnatmake -gnatv -gnatwd protected_test

GNAT GPL 2005 (20050729)
Copyright 1992-2005 Free Software Foundation, Inc.

Compiling: protected_test.adb (source file time stamp: 2006-10-26 21:53:50)

      8.       entry E when True is
               |
         >>> warning: implicit dereference

  18 lines: No errors, 1 warning
gnatbind -x protected_test.ali
gnatlink protected_test.ali


The -gnatwd option is used to warn against implicit .all when access 
variable is used to access record components and has nothing to do with 
protected objects. Removing one of the options is enough to make the 
compiler happy with the entry keyword, but then the protection against 
implicit .all is lost.

Is it a bug or a feature?

-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/



             reply	other threads:[~2006-10-27  7:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-27  7:57 Maciej Sobczak [this message]
2006-10-27  9:03 ` GNAT bug? Stephen Leake
2006-10-27 17:25   ` Martin Krischik
2006-10-27 18:21     ` Pascal Obry
2006-10-27 18:30     ` (see below)
  -- strict thread matches above, loose matches on Subject: below --
2006-10-27 20:39 Anh Vo
1999-02-09  0:00 Juergen.Hoyng
1999-02-09  0:00 ` Stephen Leake
1999-02-10  0:00   ` Pascal Obry
1999-02-10  0:00     ` Tucker Taft
1999-02-11  0:00   ` Juergen.Hoyng
1999-02-10  0:00 ` Pascal Obry
1999-02-10  0:00   ` Tucker Taft
1999-02-11  0:00     ` Pascal Obry
1998-02-27  0:00 Haug Buerger
1998-02-28  0:00 ` Jerry van Dijk
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox