public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
@ 2008-11-21 8:50 tsyvarev at ispras dot ru
2008-11-21 9:20 ` [Bug libstdc++/38210] " paolo dot carlini at oracle dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: tsyvarev at ispras dot ru @ 2008-11-21 8:50 UTC (permalink / raw)
To: gcc-bugs
The following num_put<> member function
iter_type do_put(iter_type out, ios_base& str, char_type fill, const void* val)
const
incorrectly performs padding of a string to bring its length to the required
value if 'adjustfield' flag is equal to 'internal': instead of adding fill
characters after "0x" it adds them at the beginning of the string
According to the description of padding options (22.2.2.2.2 p19), if
adjustfield == internal and representation after stage 1 began with 0x or 0X -
pad after x or X.
Example:
#include <iostream>
#include <locale>
using namespace std;
int main()
{
void *p = (void*)0x1;
cout.width(5);
cout << internal << p << endl;
return 0;
}
output " 0x1" while it should be "0x 1"
--
Summary: num_put<>::do_put(void*) performs padding incorrectly
when adjustfield==internal
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tsyvarev at ispras dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/38210] num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
@ 2008-11-21 9:20 ` paolo dot carlini at oracle dot com
2008-11-21 10:01 ` paolo at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-11-21 9:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2008-11-21 09:19 -------
Yes.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-11-21 09:19:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/38210] num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
2008-11-21 9:20 ` [Bug libstdc++/38210] " paolo dot carlini at oracle dot com
@ 2008-11-21 10:01 ` paolo at gcc dot gnu dot org
2008-11-21 10:02 ` paolo dot carlini at oracle dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-11-21 10:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo at gcc dot gnu dot org 2008-11-21 10:00 -------
Subject: Bug 38210
Author: paolo
Date: Fri Nov 21 09:59:17 2008
New Revision: 142085
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142085
Log:
2008-11-21 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/38210
* include/bits/locale_facets.tcc (num_put<>::do_put(iter_type,
ios_base&, char_type, const void*)): Fix.
* testsuite/22_locale/num_put/put/char/38210.cc: New.
* testsuite/22_locale/num_put/put/wchar_t/38210.cc: Likewise.
Added:
trunk/libstdc++-v3/testsuite/22_locale/num_put/put/char/38210.cc
trunk/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/38210.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/locale_facets.tcc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/38210] num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
2008-11-21 9:20 ` [Bug libstdc++/38210] " paolo dot carlini at oracle dot com
2008-11-21 10:01 ` paolo at gcc dot gnu dot org
@ 2008-11-21 10:02 ` paolo dot carlini at oracle dot com
2008-11-23 11:13 ` dominiq at lps dot ens dot fr
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-11-21 10:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2008-11-21 10:00 -------
Fixed for 4.4.0.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/38210] num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
` (2 preceding siblings ...)
2008-11-21 10:02 ` paolo dot carlini at oracle dot com
@ 2008-11-23 11:13 ` dominiq at lps dot ens dot fr
2008-11-23 12:04 ` dominiq at lps dot ens dot fr
2008-11-23 14:02 ` paolo dot carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-11-23 11:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dominiq at lps dot ens dot fr 2008-11-23 11:12 -------
On *-apple-darwin9, the following tests are now failing:
FAIL: 22_locale/num_put/put/char/38210.cc execution test
FAIL: 22_locale/num_put/put/wchar_t/38210.cc execution test
--
dominiq at lps dot ens dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo dot carlini at oracle
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/38210] num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
` (3 preceding siblings ...)
2008-11-23 11:13 ` dominiq at lps dot ens dot fr
@ 2008-11-23 12:04 ` dominiq at lps dot ens dot fr
2008-11-23 14:02 ` paolo dot carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-11-23 12:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dominiq at lps dot ens dot fr 2008-11-23 12:02 -------
Apparently the failures I have reported in comment #4 disappear if I rebuild
libstdc++. Sorry for the noise.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/38210] num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
` (4 preceding siblings ...)
2008-11-23 12:04 ` dominiq at lps dot ens dot fr
@ 2008-11-23 14:02 ` paolo dot carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-11-23 14:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo dot carlini at oracle dot com 2008-11-23 14:01 -------
(In reply to comment #5)
> Apparently the failures I have reported in comment #4 disappear if I rebuild
> libstdc++.
Not surprising ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38210
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-23 14:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-21 8:50 [Bug libstdc++/38210] New: num_put<>::do_put(void*) performs padding incorrectly when adjustfield==internal tsyvarev at ispras dot ru
2008-11-21 9:20 ` [Bug libstdc++/38210] " paolo dot carlini at oracle dot com
2008-11-21 10:01 ` paolo at gcc dot gnu dot org
2008-11-21 10:02 ` paolo dot carlini at oracle dot com
2008-11-23 11:13 ` dominiq at lps dot ens dot fr
2008-11-23 12:04 ` dominiq at lps dot ens dot fr
2008-11-23 14:02 ` paolo dot carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).