[Bug libstdc++/23757] iostreams hex formatting for signed integers treats than as unsigned
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Wed Sep 7 19:19:00 GMT 2005
------- Additional Comments From pcarlini at suse dot de 2005-09-07 19:19 -------
(In reply to comment #10)
> one of the key differentiators
> with iostreams is type safety, which is effectively broken with the current
> behavior.
By the way, I don't understand what do you mean by "type safety" in this
context. Because the behavior of do_put *is* specified exactly "as if"
printf were called, either printf("%x") is able to "digest" somehow a signed
integer or not, there isn't much more to say. Currently, the impression is
that according to the C99 standard is *not*, according to the C89 standard
*maybe* it is. Then the issue would be, in case, only that of adjusting the
C++ standard not to trigger undefined behavior from the printf function that
it uses to functionally specify the mandated behavior.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23757
More information about the Gcc-bugs
mailing list