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

Re: branches/KDE/3.4/kdepim/libkcal



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, 
and then sets all its bits to 0.

If you have evidences that it's not done, I suggest you to bug gcc since 
a really serious problem.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpG79yIPRE1D.pgp
Description: PGP signature


Reply to: