> #ifdef __cplusplus > # define D32(p, r, v) { v } > #else > # ifndef offsetof > # define offsetof(st, m) ((uint32_t)(&((st *)0)->m)) > # endif > # define D32(p, r, v) [offsetof(p, r)/sizeof(uint32_t)] = { v } > #endif > > As they are not supported in C++, my initial idea was to simply insert the > missing registers in between to simply use D32 homogeneously. > > Do you know of any other alternative for the designated initializers in C++? No I don't, not really. There is some discussion in the web on using C++11 explicit initialisation lists and constexpr functions to construct the right initialisation list during compile time, but I haven't seen any such real life implementation. --Pekka