Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jul 2023 12:11:02 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        dev-commits-src-main@freebsd.org
Subject:   Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t
Message-ID:  <FAEA60BF-5EB0-4B58-B825-B7257681EC97@yahoo.com>
In-Reply-To: <4EC1C526-0155-4E46-974B-1B8421D21AAD@yahoo.com>
References:  <E27F699E-2CD2-48A2-BDA7-37765D371B0B@yahoo.com> <CBD03269-F9AE-4B4A-B560-FBE82BF243C6@yahoo.com> <ZKWyJTbtU64pL2Ex@spindle.one-eyed-alien.net> <4EC1C526-0155-4E46-974B-1B8421D21AAD@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I caution that C23 and C++23 may have differing detail
for unions for unionvar = {} sorts of notation:

N4950 for C++ reports (note the otherwise case):

QUOTE
If the aggregate is a nion and the initalizer lst is empty, then
-- if any variant member as a deafult member initializer,
    that member is initialized from itis default member initializer
-- otherwise, the first memmber of the union (if any) is
    copy-initialized from an empty initializer list.
END QUOTE

If the first member of the C++23 union has fewer bytes than
the union does overall, the "otherwise" wording would not
involve initializing the bytes that the first member does not
include.


===
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FAEA60BF-5EB0-4B58-B825-B7257681EC97>