This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Correctly output internal-adjusted hexadecimals
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 29 Nov 2001 01:52:55 +0100
- Subject: Re: [PATCH] Correctly output internal-adjusted hexadecimals
- References: <Pine.SOL.3.91.1011128162924.23357B-100000@taarna.cygnus.com>
Benjamin Kosnik wrote:
> Hey, nice job. This is in.
Good!
However, Benjamin, I think there is a very subtle issue lurking in the PR. The
original testcase has:
oss << "0xTrap!";
notice the double commas!
As I understand the standard this is *not* a number but a string, so
libstdc++-v3 should process it as a string not as an hex, and output the *whole*
0xTrap! block right aligned with padding before, i.e, what internal alignment
boils down for strings.
On the other hand, __pad, which is unified for num_put and ostream, sees only
strings, and deals with the various cases only on the basis of the first chars
of the string passed as a parameter. It has *no way* to make a distintion.
Of course, if the testcase is something like (i.e. my testcase for the
testsuite):
oss << 0x43535;
then, after this last check in ;-) everything is ok.
What do you think?
Cheers,
Paolo.