comp.lang.ada
 help / color / mirror / Atom feed
* Gem 39 - compiler specific?
@ 2009-09-02 20:38 Maciej Sobczak
  2009-09-02 23:20 ` Randy Brukardt
  2009-09-03  0:12 ` Adam Beneschan
  0 siblings, 2 replies; 20+ messages in thread
From: Maciej Sobczak @ 2009-09-02 20:38 UTC (permalink / raw)


Consider:

http://www.adacore.com/2008/06/09/gem-39/

The example code performs Unchecked_Conversion between addresses of
two different array types.
As far as I understand, there is no standard provision for arrays to
occupy contiguous memory space (and not even for the alignment of
their components) and such a conversion relies heavily on the
assumption that arrays can be "overlaid" by plain address
reinterpretation.

Still, this technique is quite attractive. What is the chance (in
practice) to hit the compiler that does not get it "right"?

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



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

end of thread, other threads:[~2009-09-06  6:54 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-02 20:38 Gem 39 - compiler specific? Maciej Sobczak
2009-09-02 23:20 ` Randy Brukardt
2009-09-03  7:26   ` Dmitry A. Kazakov
2009-09-03 15:26     ` Adam Beneschan
2009-09-03 16:38       ` Dmitry A. Kazakov
2009-09-03 17:27         ` Adam Beneschan
2009-09-03 20:26           ` Dmitry A. Kazakov
2009-09-03 22:06             ` Randy Brukardt
2009-09-04  7:29               ` Dmitry A. Kazakov
2009-09-04 12:07                 ` Maciej Sobczak
2009-09-04 13:06                   ` Dmitry A. Kazakov
2009-09-04 17:18                     ` Dmitry A. Kazakov
2009-09-04 20:34                     ` Maciej Sobczak
2009-09-04 22:41                   ` sjw
2009-09-05 20:45                     ` Maciej Sobczak
2009-09-06  6:54                       ` sjw
2009-09-03 21:58           ` Randy Brukardt
2009-09-04 17:26           ` Robert A Duff
2009-09-03 21:53     ` Randy Brukardt
2009-09-03  0:12 ` Adam Beneschan

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