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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Preventing private procedure visibility being made public through extension Date: Sun, 20 May 2018 12:22:08 +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: h2725194.stratoserver.net; posting-host="6e6d3fb9eee5c4fbc9c7c9ad08118c9d"; logging-data="6873"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4IOPS4K83gBukeLWodXUJ7/mmY/e6HkM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:AZrd+EUvGL/bX0k6zFrWHn6P6hg= sha1:HO7b54jL3Mih4Y566hOyflUS1vM= Xref: reader02.eternal-september.org comp.lang.ada:52485 Date: 2018-05-20T12:22:08+01:00 List-Id: Simon Wright writes: > "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?) I think it must have been reported, because it's fixed in 8.1.0.