This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/15276] Erroneous Comparisons of Negative Characters


------- Additional Comments From pcarlini at suse dot de  2004-05-05 10:53 -------
> The issue as I see it is quite simple:  The specification in table 37
> regarding char_traits<>::compare is clear, and it takes an
> extraodinary interpretation to conclude that string::compare 
> and std::strcmp should match

Therefore, you don't think that tons of code around relies on that? And, if
a std::string and a "C" string are supposed to be so essentially different,
what is c_str() all about?

I think that the interpretation of the letter of the standard is easy, but,
at the same time, I think that, perhaps (I hope Nathan will provided soon
his opinion) this difference with "C" strings was not really intended. And
I think that the two specializations were actually meant to allow exploiting
for efficiency strcmp and wcscmp.

Are there other implementations around that actually use Table37 instead of
strcmp and wcscmp for char and wchar_t? I'm sure of one thing: the other
major implementation which often and often interworks with libstdc++-v3 doesn't.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15276


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