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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,799bdb14b530ce1d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.14.210.133 with SMTP id u5mr39382eeo.2.1349940457480; Thu, 11 Oct 2012 00:27:37 -0700 (PDT) Path: q11ni134268871wiw.1!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Odd subtyping error. Date: Fri, 05 Oct 2012 21:12:16 +0300 Organization: Tidorum Ltd Message-ID: References: <99b6ed38-0a44-4649-82b7-0b724fa5e68f@googlegroups.com> Mime-Version: 1.0 X-Trace: individual.net +bSQ+LqFZgAkhPcijufxqQTzDHm585kKUigskySH7EID3760sE Cancel-Lock: sha1:YQBO0971/jMkqAGFcytzaqhJCQ4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <99b6ed38-0a44-4649-82b7-0b724fa5e68f@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-10-05T21:12:16+03:00 List-Id: On 12-10-05 19:05 , Shark8 wrote: > I'm making a new OpenGL binding taking advantage of Ada 2012 and have come across several interesting errors, including a compiler-bug... but this one is by far the oddest: > > Type Pixel_Storage is ( > UNPACK_SWAP_BYTES, UNPACK_LSB_FIRST, UNPACK_ROW_LENGTH, > UNPACK_SKIP_ROWS, UNPACK_SKIP_PIXELS, UNPACK_ALIGNMENT, > PACK_SWAP_BYTES, PACK_LSB_FIRST, PACK_ROW_LENGTH, > PACK_SKIP_ROWS, PACK_SKIP_PIXELS, PACK_ALIGNMENT, > PACK_SKIP_IMAGES, PACK_IMAGE_HEIGHT, UNPACK_SKIP_IMAGES, > UNPACK_IMAGE_HEIGHT > ) with Size => Enum'Size; > > SubType Pixel_Packing is Pixel_Storage Range PACK_SWAP_BYTES..PACK_IMAGE_HEIGHT; > > Unless I'm just completely misunderstanding the above should be perfectly fine, yet it generates a few errors: > warning: no more representation items for type "Pixel_Storage" defined at line 625 > representation item appears too late [private section representation-clause] > It would be easier to answer you if you showed a complete, minimal example (i.e. an .ads file) where you have removed the irrelevant parts. The second error/warning line suggests to me that you have declared Pixel_Storage first as a "private" type, and that the full type declaration, including the "with Size" clause, appears only in the "private" part of the package declaration. Is that the case? -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .