public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59173] New: Alias template in partial specialization finds name from primary template
@ 2013-11-18 13:34 jhs at edg dot com
  2013-11-18 14:43 ` [Bug c++/59173] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jhs at edg dot com @ 2013-11-18 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59173
           Summary: Alias template in partial specialization finds name
                    from primary template
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jhs at edg dot com

In code such as the following, which is present in the <ext/extptr_allocator.h>
and <ext/pointer.h> headers, the type in the alias template definition finds
the rebind from the primary template.  The correct behavior is to give an error
because "rebind<_Up>" should be preceded by the "template" keyword for
syntactic disambiguation.

This is also a defect in those two headers as the template keyword should be
added there.

template<typename _Ptr>
struct pointer_traits
{
  template<typename _Up> struct rebind {};
};

template<typename T> struct P {};

template<typename T>
struct pointer_traits<P<T> >
{
  template<typename _Up>
     using rebind = P<typename pointer_traits<T>::rebind<_Up>>;
};


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

* [Bug c++/59173] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
@ 2013-11-18 14:43 ` redi at gcc dot gnu.org
  2013-11-18 14:44 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-18 14:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks for the report, John. I'll fix the library parts (assuming the corrected
versions still compile with G++)


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

* [Bug c++/59173] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
  2013-11-18 14:43 ` [Bug c++/59173] " redi at gcc dot gnu.org
@ 2013-11-18 14:44 ` paolo.carlini at oracle dot com
  2013-11-20 13:40 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-18 14:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
It does, AFAICS.


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

* [Bug c++/59173] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
  2013-11-18 14:43 ` [Bug c++/59173] " redi at gcc dot gnu.org
  2013-11-18 14:44 ` paolo.carlini at oracle dot com
@ 2013-11-20 13:40 ` redi at gcc dot gnu.org
  2013-11-20 13:42 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-20 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Nov 20 13:39:33 2013
New Revision: 205114

URL: http://gcc.gnu.org/viewcvs?rev=205114&root=gcc&view=rev
Log:
    PR c++/59173
    * include/ext/pointer.h (pointer_traits<>::rebind<>): Add template
    keyword in nested name.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/ext/pointer.h


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

* [Bug c++/59173] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
                   ` (2 preceding siblings ...)
  2013-11-20 13:40 ` redi at gcc dot gnu.org
@ 2013-11-20 13:42 ` redi at gcc dot gnu.org
  2021-08-02  2:47 ` [Bug c++/59173] [10/11 Regression] " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-20 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-20
     Ever confirmed|0                           |1

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
John, I only found one problem in <ext/pointer.h>. Was the error in
<ext/extptr_allocator.h> due to including <ext/pointer.h>?

Confirming as a front-end bug anyway.


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

* [Bug c++/59173] [10/11 Regression] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
                   ` (3 preceding siblings ...)
  2013-11-20 13:42 ` redi at gcc dot gnu.org
@ 2021-08-02  2:47 ` pinskia at gcc dot gnu.org
  2022-06-28 10:30 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-02  2:47 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.4
      Known to fail|                            |10.1.0, 4.8.5
            Summary|Alias template in partial   |[10/11 Regression] Alias
                   |specialization finds name   |template in partial
                   |from primary template       |specialization finds name
                   |                            |from primary template
      Known to work|                            |4.9.0, 7.5.0, 9.3.0, 9.4.0

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So this was fixed in 4.9 and then broke again in GCC 10 so it is a regression.

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

* [Bug c++/59173] [10/11 Regression] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
                   ` (4 preceding siblings ...)
  2021-08-02  2:47 ` [Bug c++/59173] [10/11 Regression] " pinskia at gcc dot gnu.org
@ 2022-06-28 10:30 ` jakub at gcc dot gnu.org
  2023-07-07  7:26 ` [Bug c++/59173] [11/12/13/14 " rguenth at gcc dot gnu.org
  2023-07-07  7:26 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 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] 9+ messages in thread

* [Bug c++/59173] [11/12/13/14 Regression] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
                   ` (5 preceding siblings ...)
  2022-06-28 10:30 ` jakub at gcc dot gnu.org
@ 2023-07-07  7:26 ` rguenth at gcc dot gnu.org
  2023-07-07  7:26 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11 Regression] Alias    |[11/12/13/14 Regression]
                   |template in partial         |Alias template in partial
                   |specialization finds name   |specialization finds name
                   |from primary template       |from primary template
      Known to fail|                            |10.5.0, 13.1.1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
The testcase is still accepted.

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

* [Bug c++/59173] [11/12/13/14 Regression] Alias template in partial specialization finds name from primary template
  2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
                   ` (6 preceding siblings ...)
  2023-07-07  7:26 ` [Bug c++/59173] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2023-07-07  7:26 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 13:34 [Bug c++/59173] New: Alias template in partial specialization finds name from primary template jhs at edg dot com
2013-11-18 14:43 ` [Bug c++/59173] " redi at gcc dot gnu.org
2013-11-18 14:44 ` paolo.carlini at oracle dot com
2013-11-20 13:40 ` redi at gcc dot gnu.org
2013-11-20 13:42 ` redi at gcc dot gnu.org
2021-08-02  2:47 ` [Bug c++/59173] [10/11 Regression] " pinskia at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07  7:26 ` [Bug c++/59173] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-07-07  7:26 ` 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).