This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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


Gabriel Dos Reis wrote:

Do you have any real world example to submit for scrunity?

No -- but I've certainly seen GCC/G++ fail to optimize away code that was "obviously" not needed. Especially if that code looked initially like writes to memory.


| In any case, why should we take that chance?
| | If someone runs a benchmark of G++ & V3 vis a vis some other system,
| and the benchmark shows that we're slower, we lose. It doesn't matter
| whether that's because of the compiler or the library. No, I'm not
| arguing that we should hand code the entire library in some special
| style that's particularly amenable to G++. I am arguing, however,
| that inserting code to do something that is on most systems at best


| pointless, and quite possibly harmful, is a mistake.

What is a possibly harmful, a mistake is this meaningless discussion
with you about benchmarks on singular iterator values.  I understand
you value speed over correctness.  We just have to agree to disagree.

My understanding is that the initialization being added is not required by the standard for the library (as opposed to the part of the standard that talks about acessing uninitialized values), but is required on certain architectures where copying uninitialized values is not allowed. If that understanding is correct, then there is no correctness issue on other architectures. If the library standard requires default initialization of these members, then my understanding is incorrect, and my argument is bogus.


I'm happy to agree to disagree, but I'd be curious to know whether or not I've understood the issue.

--
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]