> I have anuther issue with the change tho: as written, it forces > the struct (it's only a union by accident) _gc_head to be aligned, > but is it obvious that it really has to pad up the size too ? Yes. > If for example sizeof (int) is 4, sizeof (struct *) is 8 and > sizeof (double) is 16, with 8 byte alignment required for doubles, > would a compiler be allowed to make sizeof (struct _gc_head[1]) 24, > while still keeping sizeof (struct _gc_head) at 20 ? No. Each item in an array has to be aligned, so the sizeof a struct must be a multiple of the largest required alignment for any of its items. It's all spelled out in the C standard, so don't worry. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4