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: Defect reports?


Pétur Runólfsson wrote:

...
* The resolution of DR 25 requires undefined behaviour.

What makes you think that?


Well, the fixed text reads
  as if by calling os.rdbuf()->sputn(str.data(), n), [...] where n is
  the larger of os.width() and str.size();
If n is larger than str.size(), then sputn will read past the end of
the array returned by str.data().  Or maybe padding should modify str,
but that is also undefined, since str is const.

Ah, sorry, I was looking at issue 23, not 25. My mistake.


Martin


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