Bugs/non-portable assumptions in libstdc++
Paolo Carlini
pcarlini@suse.de
Fri Nov 19 18:14:00 GMT 2004
Hi Chris,
>With this as background, I have two questions for the list: 1. Do you
>agree that this is really a bug/non-portable assumption?
>
Well, 3.6.2/1:
"Objects with static storage duration (3.7.1) shall be zero
inizialized (8.5) before
any other inizialization takes place."
Where 3.7.1/4 says:
"The keyword static applied to a class data member in a class definition
gives the data member static storage duration."
Or I'm missing something/you actually mean something else?!?
> 2. Do you know
>of any other places in libstdc++ where this 'optimization' (eliding the
>initialization) is done?
>
>
Yes, for sure _S_empty_rep_storage in basic_string, most likely others...
Thanks,
Paolo.
More information about the Libstdc++
mailing list