public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95608] New: c++20 wrong code for defaulted equality comparison on array member variables
@ 2020-06-09 16:05 vermaelen.wouter at gmail dot com
  2021-01-18 15:18 ` [Bug c++/95608] " ppalka at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vermaelen.wouter at gmail dot com @ 2020-06-09 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95608
           Summary: c++20 wrong code for defaulted equality comparison on
                    array member variables
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vermaelen.wouter at gmail dot com
  Target Milestone: ---

The generated code does not actually compare the content of the array. It does
with clang and msvc.

-----------------

https://godbolt.org/z/VkuVXj

-----------------

struct S {
    int a[5];
    bool operator==(const S&) const = default;
};

bool f(const S& x, const S& y) {
    return x == y;
}

-----------------

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

* [Bug c++/95608] c++20 wrong code for defaulted equality comparison on array member variables
  2020-06-09 16:05 [Bug c++/95608] New: c++20 wrong code for defaulted equality comparison on array member variables vermaelen.wouter at gmail dot com
@ 2021-01-18 15:18 ` ppalka at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-01-18 15:18 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
This seems to be a dup of PR93480, which is now fixed on trunk.

*** This bug has been marked as a duplicate of bug 93480 ***

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

end of thread, other threads:[~2021-01-18 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 16:05 [Bug c++/95608] New: c++20 wrong code for defaulted equality comparison on array member variables vermaelen.wouter at gmail dot com
2021-01-18 15:18 ` [Bug c++/95608] " ppalka 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).