comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Odd subtyping error.
Date: Fri, 5 Oct 2012 09:05:45 -0700 (PDT)
Date: 2012-10-05T09:05:45-07:00	[thread overview]
Message-ID: <99b6ed38-0a44-4649-82b7-0b724fa5e68f@googlegroups.com> (raw)

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]



             reply	other threads:[~2012-10-05 16:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 16:05 Shark8 [this message]
2012-10-05 18:12 ` Odd subtyping error Niklas Holsti
2012-10-05 18:44   ` Adam Beneschan
2012-10-05 21:08   ` Shark8
2012-10-05 21:00 ` Shark8
2012-10-05 22:11   ` Adam Beneschan
2012-10-05 22:19     ` Shark8
2012-10-06  3:08       ` Adam Beneschan
2012-10-06  4:40         ` Shark8
2012-10-06 21:21       ` sbelmont700
2012-10-06 22:08         ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox