comp.lang.ada
 help / color / mirror / Atom feed
* Odd subtyping error.
@ 2012-10-05 16:05 Shark8
  2012-10-05 18:12 ` Niklas Holsti
  2012-10-05 21:00 ` Shark8
  0 siblings, 2 replies; 11+ messages in thread
From: Shark8 @ 2012-10-05 16:05 UTC (permalink / 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]



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-10-11  7:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-05 16:05 Odd subtyping error Shark8
2012-10-05 18:12 ` 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

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