From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a01fa820bd4ed021,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!news.osn.de!diablo2.news.osn.de!news.belwue.de!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: GNAT bug? Date: Fri, 27 Oct 2006 09:57:03 +0200 Organization: CERN News Message-ID: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1161935823 12473 137.138.37.241 (27 Oct 2006 07:57:03 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Fri, 27 Oct 2006 07:57:03 +0000 (UTC) User-Agent: Thunderbird 1.5.0.7 (X11/20060922) Xref: g2news2.google.com comp.lang.ada:7227 Date: 2006-10-27T09:57:03+02:00 List-Id: 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/