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: [PATCH] Fix PR libstdc++/19510: Uninitialized variable in someiterators


I think it's a mistake to add these explicit initializations on platforms that do not actually require it. Copying uninitialized data may be undefined in ISO C++, but on most systems it's well-defined: whatever bits happened to be there get copied. All you're accomplishing is making the library slower.

On some systems (IA64) you can get traps on accessing registers with the NaT bit set, but on most others, there is no issue. I can see an argument for performing these default initializations in debugging mode, or with a flag set by the user, by the default behavior ought to be to go as fast as possible.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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