public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member
@ 2012-05-27 14:00 schaub.johannes at googlemail dot com
2012-05-27 14:33 ` [Bug c++/53499] " schaub.johannes at googlemail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: schaub.johannes at googlemail dot com @ 2012-05-27 14:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
Bug #: 53499
Summary: Incorrect partial ordering result with member vs
non-member
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
I think that this is ambiguous for partial ordering ambiguities, but GCC
accepts this code, selecting the non-member
template <class P>
class ptr
{
public:
// Picked in C++11 mode.
template<class T>
void operator- (T) const
{ static_assert(sizeof(T) == 0, "#1"); }
};
// Picked in default C++ mode.
template<class T1, class T2>
void operator- (const ptr<T1>&, const ptr<T2>&)
{ static_assert(sizeof(T1) == 0, "#2"); }
int
main ()
{
ptr <int> a, b;
(void) (b - a);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
@ 2012-05-27 14:33 ` schaub.johannes at googlemail dot com
2015-07-17 15:30 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: schaub.johannes at googlemail dot com @ 2012-05-27 14:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
--- Comment #1 from Johannes Schaub <schaub.johannes at googlemail dot com> 2012-05-27 14:00:20 UTC ---
Sorry, GCC picks the same function (non-member) disregarding of the C++
Standards mode. The comments were a left-over from a clang bug report.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
2012-05-27 14:33 ` [Bug c++/53499] " schaub.johannes at googlemail dot com
@ 2015-07-17 15:30 ` redi at gcc dot gnu.org
2015-07-17 15:30 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-17 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |barry.revzin at gmail dot com
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 66914 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
2012-05-27 14:33 ` [Bug c++/53499] " schaub.johannes at googlemail dot com
2015-07-17 15:30 ` redi at gcc dot gnu.org
@ 2015-07-17 15:30 ` redi at gcc dot gnu.org
2021-12-09 13:09 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-17 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-17
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
` (2 preceding siblings ...)
2015-07-17 15:30 ` redi at gcc dot gnu.org
@ 2021-12-09 13:09 ` pinskia at gcc dot gnu.org
2023-12-06 14:02 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-09 13:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
hmm, for the test in comment #0, GCC, ICC and MSVC all have the same behavior
of picking #2 while clang's result is the different one here where it says
operator- is ambiguous.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
` (3 preceding siblings ...)
2021-12-09 13:09 ` pinskia at gcc dot gnu.org
@ 2023-12-06 14:02 ` cvs-commit at gcc dot gnu.org
2023-12-22 21:23 ` ppalka at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-06 14:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:c1e54c82a9e1855499ef7bb8827540e6a097532b
commit r14-6221-gc1e54c82a9e1855499ef7bb8827540e6a097532b
Author: Jason Merrill <jason@redhat.com>
Date: Tue Dec 5 15:28:16 2023 -0500
c++: partial ordering of object parameter [PR53499]
Looks like we implemented option 1 (skip the object parameter) for CWG532
before the issue was resolved, and never updated to the final resolution of
option 2 (model it as a reference). More recently CWG2445 extended this
handling to static member functions; I think that's wrong, and have
opened CWG2834 to address that and how explicit object member functions
interact with it.
The FIXME comments are to guide how the explicit object member function
support should change the uses of DECL_NONSTATIC_MEMBER_FUNCTION_P.
The library testsuite changes are to make partial ordering work again
between the generic operator- in the testcase and
_Pointer_adapter::operator-.
DR 532
PR c++/53499
gcc/cp/ChangeLog:
* pt.cc (more_specialized_fn): Fix object parameter handling.
gcc/testsuite/ChangeLog:
* g++.dg/template/partial-order4.C: New test.
* g++.dg/template/spec26.C: Adjust for CWG532.
libstdc++-v3/ChangeLog:
* testsuite/23_containers/vector/ext_pointer/types/1.cc
* testsuite/23_containers/vector/ext_pointer/types/2.cc
(N::operator-): Make less specialized.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
` (4 preceding siblings ...)
2023-12-06 14:02 ` cvs-commit at gcc dot gnu.org
@ 2023-12-22 21:23 ` ppalka at gcc dot gnu.org
2024-01-12 15:27 ` jason at gcc dot gnu.org
2024-02-01 18:33 ` ppalka at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-12-22 21:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |armagvvg at gmail dot com
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 113117 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
` (5 preceding siblings ...)
2023-12-22 21:23 ` ppalka at gcc dot gnu.org
@ 2024-01-12 15:27 ` jason at gcc dot gnu.org
2024-02-01 18:33 ` ppalka at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2024-01-12 15:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
CC| |jason at gcc dot gnu.org
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for GCC 14.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/53499] Incorrect partial ordering result with member vs non-member
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
` (6 preceding siblings ...)
2024-01-12 15:27 ` jason at gcc dot gnu.org
@ 2024-02-01 18:33 ` ppalka at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-01 18:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=83371 |
CC| |hstong at ca dot ibm.com
--- Comment #8 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 83371 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-02-01 18:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
2012-05-27 14:33 ` [Bug c++/53499] " schaub.johannes at googlemail dot com
2015-07-17 15:30 ` redi at gcc dot gnu.org
2015-07-17 15:30 ` redi at gcc dot gnu.org
2021-12-09 13:09 ` pinskia at gcc dot gnu.org
2023-12-06 14:02 ` cvs-commit at gcc dot gnu.org
2023-12-22 21:23 ` ppalka at gcc dot gnu.org
2024-01-12 15:27 ` jason at gcc dot gnu.org
2024-02-01 18:33 ` 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).