public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-30 20:46 ` jason at gcc dot gnu.org
  2020-05-01 17:15 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2020-04-30 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

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

* [Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
  2020-04-30 20:46 ` [Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error jason at gcc dot gnu.org
@ 2020-05-01 17:15 ` jason at gcc dot gnu.org
  2021-05-14  9:51 ` [Bug c++/91133] [9/10/11/12 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2020-05-01 17:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
This is really a question of partial ordering; determining whether the partial
specialization is more specialized than the primary class template is
equivalent to this testcase:

template<typename T> struct Id { typedef T type; };
template<typename T, typename U, U X> struct A {};

template<typename T, typename U, U X>        void f(A<T, U,   X>); // #1
template<typename T, typename Id<T>::type X> void f(A<T, int, X>); // #2

int main()
{
  f(A<int,int,42>()); // is #2 more specialized?
}

This was rejected as ambiguous by GCC going back at least to 4.1.  It is also
rejected by EDG/icc.  It is accepted by clang and msvc, like the original
testcase.

The issue is with the partial ordering deduction of #1 from #2: we deduce int
for U from the second argument, and Id<T>::type for U from the third argument,
and those don't agree, so deduction for the third argument fails in both
directions, and the functions are ambiguous.

This is related to open core issues 455 and 1337.

I don't know what rationale clang/msvc are using to conclude that #2 is more
specialized.

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

* [Bug c++/91133] [9/10/11/12 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
  2020-04-30 20:46 ` [Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error jason at gcc dot gnu.org
  2020-05-01 17:15 ` jason at gcc dot gnu.org
@ 2021-05-14  9:51 ` jakub at gcc dot gnu.org
  2021-06-01  8:14 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

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

* [Bug c++/91133] [9/10/11/12 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-05-14  9:51 ` [Bug c++/91133] [9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-06-01  8:14 ` rguenth at gcc dot gnu.org
  2022-05-27  9:41 ` [Bug c++/91133] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug c++/91133] [10/11/12/13 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-06-01  8:14 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:41 ` rguenth at gcc dot gnu.org
  2022-06-28 10:37 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug c++/91133] [10/11/12/13 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-05-27  9:41 ` [Bug c++/91133] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:37 ` jakub at gcc dot gnu.org
  2023-03-16 17:07 ` jason at gcc dot gnu.org
  2023-07-07 10:35 ` [Bug c++/91133] [11/12/13/14 " rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug c++/91133] [10/11/12/13 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-06-28 10:37 ` jakub at gcc dot gnu.org
@ 2023-03-16 17:07 ` jason at gcc dot gnu.org
  2023-07-07 10:35 ` [Bug c++/91133] [11/12/13/14 " rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-16 17:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |SUSPENDED
           Assignee|jason at gcc dot gnu.org           |unassigned at gcc dot gnu.org

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
The error was downgraded to a pedwarn in r12-8256.  I still think it is
correct, but I'm suspending rather than closing due to the continuing
implementation divergence.

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

* [Bug c++/91133] [11/12/13/14 Regression] Wrong "partial specialization is not more specialized than" error
       [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2023-03-16 17:07 ` jason at gcc dot gnu.org
@ 2023-07-07 10:35 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

end of thread, other threads:[~2023-07-07 10:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-91133-4@http.gcc.gnu.org/bugzilla/>
2020-04-30 20:46 ` [Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error jason at gcc dot gnu.org
2020-05-01 17:15 ` jason at gcc dot gnu.org
2021-05-14  9:51 ` [Bug c++/91133] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:14 ` rguenth at gcc dot gnu.org
2022-05-27  9:41 ` [Bug c++/91133] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:37 ` jakub at gcc dot gnu.org
2023-03-16 17:07 ` jason at gcc dot gnu.org
2023-07-07 10:35 ` [Bug c++/91133] [11/12/13/14 " rguenth 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).