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: a07f3367d7,556e5b18154df788 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.96.225 with SMTP id dv1mr103587wib.6.1365188593554; Fri, 05 Apr 2013 12:03:13 -0700 (PDT) From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Interresting, possibly buggy behavior in GNAT generics w/ expression function. Date: Fri, 29 Mar 2013 15:48:21 +0000 Organization: A noiseless patient Spider Message-ID: References: <615039cc-f33b-486a-b242-2c87292271d6@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx05.eternal-september.org; posting-host="72a7bb6120f61bc7749e29c9c2e535af"; logging-data="11569"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+2nAjMJ1LOUaaYluko9w+3R7gI2mwmis=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:Ld8x92HQany6RrD6S/UGiRYrLcU= sha1:al/VoycpdYRVk9x8kAiwciBp4ic= Path: p18ni39385wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.138.MISMATCH!xlned.com!feeder5.xlned.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.stben.net!talisker.lacave.net!lacave.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail Content-Type: text/plain Date: 2013-03-29T15:48:21+00:00 List-Id: Shark8 writes: > On Friday, March 29, 2013 8:47:36 AM UTC-6, Simon Wright wrote: >> Shark8 writes: >> >> >> >> > Function Image(Value : Positive) Return String is >> >> > ( --if Value not in positive then "" else >> >> > Units.Constant_Reference( Attribute_Units, Value ) ); >> >> >> >> Or, of course, Attribute_Units (Value) ! > > That doesn't work. > That I'm pretty sure is a bug; in any case at least the [compile-time] > error it gives is utterly useless: > generic_attribute_set.ads:36:07: "" is undefined With GCC 4.7.0, it gives a bug box. With GNAT GPL 2012, as you say. With GCC 4.8.0 (release candidate r196827) it works fine.