On Wed, Jan 11, 2023 at 03:17:58PM -0500, Derrick Stolee wrote: > > For example, here's an attempt to let the caller use designated > > initializers to set up the query struct: > > > + struct object_info oi = OBJECT_INFO(.typep = type, > > + .sizep = size, > > + .contentp = &data); > > Your macro expansion creates this format: > > struct object_info oi = { > .type = type, > .sizep = size, > .contentp = &data, > }; > > And even this expansion looks a bit better than the inline > updates: There's a subtle assumption in the expanded initializer, though, which is that everything not specified is OK to be zero-initialized. That works for object_info, but not for arbitrary structs (which is why we have these INIT macros in the first place). -Peff