This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bugs/non-portable assumptions in libstdc++


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]