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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Preventing private procedure visibility being made public through extension Date: Fri, 26 May 2017 23:35:37 +0100 Organization: A noiseless patient Spider Message-ID: References: <4a47e4cd-829c-4451-abf1-82cf60b67706@googlegroups.com> <9cdf04e6-123e-4bd9-b466-77aad00d61bb@googlegroups.com> <62e326e6-dd15-4546-83dc-b1e423327c23@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="66e29bfb7e505ddae44b48b9632b22ca"; logging-data="6160"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iFU3rq7rvN445D7ZohTde5tbCeFvWCmI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (darwin) Cancel-Lock: sha1:i7Wmgg5ZsRfNMtb3Y/7CW5MJMUI= sha1:PxiuVmQHT2j9xT0xEahVKROdwMM= Xref: news.eternal-september.org comp.lang.ada:46869 Date: 2017-05-26T23:35:37+01:00 List-Id: "Randy Brukardt" writes: > Ah, a subtype. GNAT has (or had?)a bug having to do with making things > visible because of a subtype declaration (I recall someone else > running across that and having verified it myself). That's just plain > wrong, a subtype has no effect on what's visible in a prefixed call > (or anywhere else for that matter, in particular with "use all type"). > > You ought to have an ambiguity if you tried to call Something in the > body of More_Derived, but it should be OK in the main subprogram. > > I'd skip the subtype and just use the real name of the type. And > possibly make a bug report to AdaCore. > You could also use a traditional call (More_Derived.Something (M, P);) > which would avoid the buggy part of GNAT. Quite right, Randy (GCC 7.1.0, still; has anyone reported this?)