Hi Samuel
On Sun, Sep 24, 2023 at 4:24 AM Samuel Thibault <[email protected]>
wrote:
> Samuel Thibault, le dim. 24 sept. 2023 00:16:21 +0200, a ecrit:
> > const mach_msg_type_long_t nameType = {
> > .msgtl_header = {
> > .msgt_name = 0,
> > .msgt_size = 0,
> > .msgt_number = 0,
> > .msgt_inline = TRUE,
> > .msgt_longform = TRUE,
> > .msgt_deallocate = FALSE,
> > .msgt_unused = 0
> > },
> > .msgtl_name = (unsigned short) MACH_MSG_TYPE_STRING_C,
> > .msgtl_size = 1024,
> > .msgtl_number =.1,
> > };
> >
> >
> > Is that actually defined behavior?
>
> It doesn't seem well-defined indeed. The gcc documentation says that the
> last initializer is used (which means mixture is not supported), and
> -Woverride-init (which is in -Wextra) warns about it.
>
In the first version of this patch I mentioned that the following MiG
change is necessary too:
https://lists.gnu.org/archive/html/bug-hurd/2023-05/msg00288.html
That should solve the problem.
Flavio
> Samuel
>