comp.lang.ada
 help / color / mirror / Atom feed
* C's sizeof
@ 2012-04-12 16:27 Simon Wright
  2012-04-12 16:43 ` Adam Beneschan
  2012-04-12 22:24 ` Robert A Duff
  0 siblings, 2 replies; 8+ messages in thread
From: Simon Wright @ 2012-04-12 16:27 UTC (permalink / raw)


The (draft) ARM Annex B.3[1] says at para 73 - Note 7 -

    "To obtain the effect of C's sizeof(item_type), where Item_Type is
    the corresponding Ada type, evaluate the expression:
    size_t(Item_Type'Size/CHAR_BIT)."

Should that not be

    size_t((Item_Type'Size + CHAR_BIT - 1)/CHAR_BIT)

?

[1] http://www.ada-auth.org/standards/12rm/html/RM-B-3.html



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

end of thread, other threads:[~2012-04-13  5:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 16:27 C's sizeof Simon Wright
2012-04-12 16:43 ` Adam Beneschan
2012-04-12 18:42   ` Simon Wright
2012-04-12 18:58     ` Adam Beneschan
2012-04-12 20:29       ` Simon Wright
2012-04-12 20:59       ` Jeffrey Carter
2012-04-12 22:24 ` Robert A Duff
2012-04-13  5:57   ` Simon Wright

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