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,29523eff834b8169 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Vinzent Hoefler" Newsgroups: comp.lang.ada Subject: Re: Warnings about hiding Date: Sat, 09 Oct 2010 03:31:58 +0200 Message-ID: References: <44e7dff1-04f5-46ad-8521-e4fe030c9c29@26g2000yqv.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: individual.net Uqc0KgYaBH0Yxl5foNjVMwhq90aP3caUIAWmq84tnSvsTvX60W Cancel-Lock: sha1:RcDdLUNc7VTREhx9LF8KECsMLBQ= User-Agent: Opera Mail/10.62 (Win32) Xref: g2news1.google.com comp.lang.ada:14454 Date: 2010-10-09T03:31:58+02:00 List-Id: On Fri, 08 Oct 2010 14:47:05 +0200, Julian Leyh wrote: > $ cat foo.ads > with Ada.Finalization; > package foo is > type Foobar is new Ada.Finalization.Controlled with null record; > function "=" (L,R : in Foobar) return Boolean; > private > procedure Finalize (Object : in out Foobar); > end foo; > $ gnat -gnatwh -gnatc foo.ads > gcc -c -gnatwh -gnatc foo.ads > foo.ads:4:13: warning: declaration of "=" hides one in package > Standard > foo.ads:6:14: warning: declaration of "Finalize" hides one at line 3 > $ JFTR: If you move "Finalize" into the public part, the warning for it disappears (just tested with GNAT GPL 2010). (IMO, there's no point putting it in the private part, the operation is already known, anyway.) Vinzent. -- There is no signature.