Sujet : Re: C89 "bug"
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.cDate : 13. Dec 2024, 13:56:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20241213145639.00003d71@yahoo.com>
References : 1
User-Agent : Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
On Fri, 13 Dec 2024 09:15:58 -0300
Thiago Adams <
thiago.adams@gmail.com> wrote:
Does anyone knows how can I convert this code (external declaration)
to C89?
union U {
int i;
double d;
};
union U u = {.d=1.2};
The problem is that in C89 only the first member of the union is
initialized.
union U {
double d;
int i;
};