[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: branches/KDE/3.4/kdepim/libkcal



On Friday 19 August 2005 21:14, Pierre Habouzit wrote:
> Le Ven 19 Août 2005 20:40, Reinhold Kainhofer a écrit :
> > It seems that gcc 4.0 is no longer initializing all members of a
> > struct, while gcc 3.3.x obviously did something like that.
>
> Then it's a gcc bug.
>
> when you write :
>
> Type1 func(...) {
>     Type foo;
> }
>
> AFAIK either Type is a class, and then it's () constructor is called,
> else if it's a struct, a default constructor is called, that does the
> same as in C : it allocates enough space to make the struct live in
> it,

correct

> and then sets all its bits to 0. 

since when? You've to initialize PODs (bool, int, pointer, ...) yourself 
in C and C++.



Reply to: