public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/57704] New: std::char_traits<char>::lt is not standards-compliant
@ 2013-06-24 22:20 tudorb at fb dot com
  2013-06-24 22:57 ` [Bug libstdc++/57704] " paolo.carlini at oracle dot com
  2013-06-25  8:40 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: tudorb at fb dot com @ 2013-06-24 22:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57704

            Bug ID: 57704
           Summary: std::char_traits<char>::lt is not standards-compliant
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tudorb at fb dot com

Created attachment 30356
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30356&action=edit
simple example to illustrate the bug

The C++11 standard says in 21.2.3.1 (struct char_traits<char>):

"The two-argument members eq and lt shall be defined identically to the
built-in operators == and < for type unsigned char."

However, this is not the case if char is signed (tested using gcc 4.1.2, 4.6.2,
and 4.7.1 on x86_64, but the trunk version of char_traits.h is the same);
char_traits<char>::lt compares the two values as char, not as unsigned char.

The attached program should print 1 twice when this bug is fixed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libstdc++/57704] std::char_traits<char>::lt is not standards-compliant
  2013-06-24 22:20 [Bug libstdc++/57704] New: std::char_traits<char>::lt is not standards-compliant tudorb at fb dot com
@ 2013-06-24 22:57 ` paolo.carlini at oracle dot com
  2013-06-25  8:40 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-24 22:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57704

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
   Target Milestone|---                         |4.9.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libstdc++/57704] std::char_traits<char>::lt is not standards-compliant
  2013-06-24 22:20 [Bug libstdc++/57704] New: std::char_traits<char>::lt is not standards-compliant tudorb at fb dot com
  2013-06-24 22:57 ` [Bug libstdc++/57704] " paolo.carlini at oracle dot com
@ 2013-06-25  8:40 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-25  8:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57704

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-25  8:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-24 22:20 [Bug libstdc++/57704] New: std::char_traits<char>::lt is not standards-compliant tudorb at fb dot com
2013-06-24 22:57 ` [Bug libstdc++/57704] " paolo.carlini at oracle dot com
2013-06-25  8:40 ` 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).