public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62160] New: std::uppercase does not work for std::hex output
@ 2014-08-15 22:29 jj at chaosbits dot net
2014-08-15 22:48 ` [Bug c++/62160] " jj at chaosbits dot net
2014-09-18 8:21 ` [Bug libstdc++/62160] " paolo.carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: jj at chaosbits dot net @ 2014-08-15 22:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62160
Bug ID: 62160
Summary: std::uppercase does not work for std::hex output
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jj at chaosbits dot net
Created attachment 33339
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33339&action=edit
pre-processed version of test.cc
Using std::uppercase should cause the use of uppercase characters in
hexadecimal integer output, but it does not seem to do so when that integer is
a pointer:
[jj@jj ~]$ g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[jj@jj ~]$ cat test.cc
#include <iostream>
int main() {
int* p = reinterpret_cast<int*>(42);
int i = 42;
std::cout << std::hex << std::uppercase << p << std::endl;
std::cout << std::hex << std::uppercase << i << std::endl;
}
[jj@jj ~]$ g++ -std=c++11 test.cc
[jj@jj ~]$ ./a.out
0x2a
2A
As can be seen above, the output is clearly not uppercase in the pointer case
(although as far as I know; pointers are integers).
This looks like a bug to me, but maybe I'm just doing something exceptionally
stupid...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/62160] std::uppercase does not work for std::hex output
2014-08-15 22:29 [Bug c++/62160] New: std::uppercase does not work for std::hex output jj at chaosbits dot net
@ 2014-08-15 22:48 ` jj at chaosbits dot net
2014-09-18 8:21 ` [Bug libstdc++/62160] " paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: jj at chaosbits dot net @ 2014-08-15 22:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62160
Jesper Juhl <jj at chaosbits dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |4.8.2
Severity|normal |minor
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/62160] std::uppercase does not work for std::hex output
2014-08-15 22:29 [Bug c++/62160] New: std::uppercase does not work for std::hex output jj at chaosbits dot net
2014-08-15 22:48 ` [Bug c++/62160] " jj at chaosbits dot net
@ 2014-09-18 8:21 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-09-18 8:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62160
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|c++ |libstdc++
Resolution|--- |INVALID
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Closing.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-18 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15 22:29 [Bug c++/62160] New: std::uppercase does not work for std::hex output jj at chaosbits dot net
2014-08-15 22:48 ` [Bug c++/62160] " jj at chaosbits dot net
2014-09-18 8:21 ` [Bug libstdc++/62160] " paolo.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).