public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition()
@ 2021-09-21 12:19 pdimov at gmail dot com
  2021-09-21 13:56 ` [Bug libstdc++/102425] " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pdimov at gmail dot com @ 2021-09-21 12:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

            Bug ID: 102425
           Summary: std::error_code() does not compare equal to
                    std::error_condition()
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pdimov at gmail dot com
  Target Milestone: ---

As the title says. https://godbolt.org/z/er7qsjvoo.

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
@ 2021-09-21 13:56 ` redi at gcc dot gnu.org
  2021-09-23 15:08 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-09-21 13:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-09-21
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The switch in system_category().default_error_condition(int) needs to treat 0
as a known value.

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
  2021-09-21 13:56 ` [Bug libstdc++/102425] " redi at gcc dot gnu.org
@ 2021-09-23 15:08 ` cvs-commit at gcc dot gnu.org
  2021-09-23 15:52 ` redi at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-23 15:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:ce01e2e64c340dadb55a8a24c545a13e654804d4

commit r12-3859-gce01e2e64c340dadb55a8a24c545a13e654804d4
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Sep 22 11:58:20 2021 +0100

    libstdc++: std::system_category should know meaning of zero [PR102425]

    Although 0 is not an errno value, it should still be recognized as
    corresponding to a value belonging to the generic_category().

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/102425
            * src/c++11/system_error.cc
            (system_error_category::default_error_condition): Add 0 to
            switch.
            * testsuite/19_diagnostics/error_category/102425.cc: New test.

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
  2021-09-21 13:56 ` [Bug libstdc++/102425] " redi at gcc dot gnu.org
  2021-09-23 15:08 ` cvs-commit at gcc dot gnu.org
@ 2021-09-23 15:52 ` redi at gcc dot gnu.org
  2021-10-12 10:59 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-09-23 15:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk so far, but I'll backport it.

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (2 preceding siblings ...)
  2021-09-23 15:52 ` redi at gcc dot gnu.org
@ 2021-10-12 10:59 ` cvs-commit at gcc dot gnu.org
  2021-10-12 16:28 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-12 10:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:da206878f64ef66b1f7527c4d87e8baf9a5c5bfd

commit r11-9110-gda206878f64ef66b1f7527c4d87e8baf9a5c5bfd
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Sep 22 11:58:20 2021 +0100

    libstdc++: std::system_category should know meaning of zero [PR102425]

    Although 0 is not an errno value, it should still be recognized as
    corresponding to a value belonging to the generic_category().

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/102425
            * src/c++11/system_error.cc
            (system_error_category::default_error_condition): Add 0 to
            switch.
            * testsuite/19_diagnostics/error_category/102425.cc: New test.

    (cherry picked from commit ce01e2e64c340dadb55a8a24c545a13e654804d4)

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (3 preceding siblings ...)
  2021-10-12 10:59 ` cvs-commit at gcc dot gnu.org
@ 2021-10-12 16:28 ` cvs-commit at gcc dot gnu.org
  2021-10-12 16:34 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-12 16:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:49f0936bdcdbad9903c3a1e9342205fd27cb8596

commit r10-10188-g49f0936bdcdbad9903c3a1e9342205fd27cb8596
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Sep 22 11:58:20 2021 +0100

    libstdc++: std::system_category should know meaning of zero [PR102425]

    Although 0 is not an errno value, it should still be recognized as
    corresponding to a value belonging to the generic_category().

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/102425
            * src/c++11/system_error.cc
            (system_error_category::default_error_condition): Add 0 to
            switch.
            * testsuite/19_diagnostics/error_category/102425.cc: New test.

    (cherry picked from commit ce01e2e64c340dadb55a8a24c545a13e654804d4)

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (4 preceding siblings ...)
  2021-10-12 16:28 ` cvs-commit at gcc dot gnu.org
@ 2021-10-12 16:34 ` redi at gcc dot gnu.org
  2021-10-13 19:42 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-10-12 16:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.5

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 10.4 and 11.3 so far.

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (5 preceding siblings ...)
  2021-10-12 16:34 ` redi at gcc dot gnu.org
@ 2021-10-13 19:42 ` cvs-commit at gcc dot gnu.org
  2021-10-13 19:46 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-13 19:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:b90b39a33154949979def3117ca868950ce8025c

commit r9-9778-gb90b39a33154949979def3117ca868950ce8025c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Sep 22 11:58:20 2021 +0100

    libstdc++: std::system_category should know meaning of zero [PR102425]

    Although 0 is not an errno value, it should still be recognized as
    corresponding to a value belonging to the generic_category().

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/102425
            * src/c++11/system_error.cc
            (system_error_category::default_error_condition): Add 0 to
            switch.
            * testsuite/19_diagnostics/error_category/102425.cc: New test.

    (cherry picked from commit ce01e2e64c340dadb55a8a24c545a13e654804d4)

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (6 preceding siblings ...)
  2021-10-13 19:42 ` cvs-commit at gcc dot gnu.org
@ 2021-10-13 19:46 ` redi at gcc dot gnu.org
  2022-02-11 14:39 ` redi at gcc dot gnu.org
  2022-03-16  9:45 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-10-13 19:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

Jonathan Wakely <redi at gcc dot gnu.org> changed:

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

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 9.5 too, thanks for the report.

This also prompted https://wg21.link/lwg3598

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (7 preceding siblings ...)
  2021-10-13 19:46 ` redi at gcc dot gnu.org
@ 2022-02-11 14:39 ` redi at gcc dot gnu.org
  2022-03-16  9:45 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2022-02-11 14:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #8)
> This also prompted https://wg21.link/lwg3598

Which has been voted into the working draft now.

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

* [Bug libstdc++/102425] std::error_code() does not compare equal to std::error_condition()
  2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
                   ` (8 preceding siblings ...)
  2022-02-11 14:39 ` redi at gcc dot gnu.org
@ 2022-03-16  9:45 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2022-03-16  9:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102425

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu.org

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 90370 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2022-03-16  9:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 12:19 [Bug libstdc++/102425] New: std::error_code() does not compare equal to std::error_condition() pdimov at gmail dot com
2021-09-21 13:56 ` [Bug libstdc++/102425] " redi at gcc dot gnu.org
2021-09-23 15:08 ` cvs-commit at gcc dot gnu.org
2021-09-23 15:52 ` redi at gcc dot gnu.org
2021-10-12 10:59 ` cvs-commit at gcc dot gnu.org
2021-10-12 16:28 ` cvs-commit at gcc dot gnu.org
2021-10-12 16:34 ` redi at gcc dot gnu.org
2021-10-13 19:42 ` cvs-commit at gcc dot gnu.org
2021-10-13 19:46 ` redi at gcc dot gnu.org
2022-02-11 14:39 ` redi at gcc dot gnu.org
2022-03-16  9:45 ` redi at gcc dot gnu.org

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).