- Fixing some undefined behavior - 2 Updates
- Observable end padding in arrays - 1 Update
red floyd <no.spam@its.invalid>: Jul 06 03:03PM -0700 > On Monday, July 6, 2020 at 4:18:14 PM UTC-5, Mr Flibble wrote: > Don't swear here, please. > Brian Fuck off trying to impose your view of morality on everyone else. |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jul 06 03:55PM -0700 > On Monday, July 6, 2020 at 4:18:14 PM UTC-5, Mr Flibble wrote: > Don't swear here, please. Don't feed the trolls, please. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
Paavo Helde <eesnimi@osa.pri.ee>: Jul 07 01:33AM +0300 07.07.2020 00:35 Juha Nieminen kirjutas: > S table[100]; > is 'table' guaranteed to be 500 bytes in size? Is it guaranteed > that there will be no padding at the end of that struct? No, of course not. An implementation can easily decide that such a struct is most effectively accessed when aligned on a 8-byte border, for example. In this case sizeof(S) would be 8. I guess the same applies for nested std::arrays. If you want a contiguous array with linear indexing, allocate a single continuous array; if you want multidimensional indexing, allocate a nested multidimensional array. It's as simple as that. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment