public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65943] New: template keyword required for base-specifier that names member of the current instantiation
@ 2015-04-30  9:04 redi at gcc dot gnu.org
  2020-11-10 17:38 ` [Bug c++/65943] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-30  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65943
           Summary: template keyword required for base-specifier that
                    names member of the current instantiation
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

template<class A> struct X
{
    template<class B> struct Base;
    template<class B> struct Data;
};

template<class A>
template<class B>
struct X<A>::Data : X<A>::Base<B>
{ };


This fails to compile:

f.cc:9:33: error: ‘typename X<A>::Base’ names ‘template<class A> template<class
B> struct X<A>::Base’, which is not a type
 struct X<A>::Data : X<A>::Base<B>
                                 ^
f.cc:9:27: error: ‘typename X<A>::Base’ names ‘template<class A> template<class
B> struct X<A>::Base’, which is not a type
 struct X<A>::Data : X<A>::Base<B>
                           ^
f.cc:10:1: error: expected class-name before ‘{’ token
 { };
 ^

Clang and EDG accept it.

It compiles if the base-specifier is changed to X<A>::template Base<B>, but I
think the addition of "but the name is not a member of the current
instantiation" to C++11 14.2 [temp.names] p4 should make it valid.

In any case, http://open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1710 will
definitely make it valid. See also
http://open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1812 and
http://open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#314
>From gcc-bugs-return-485039-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 30 09:05:10 2015
Return-Path: <gcc-bugs-return-485039-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23585 invoked by alias); 30 Apr 2015 09:05:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23513 invoked by uid 48); 30 Apr 2015 09:05:07 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59955] Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
Date: Thu, 30 Apr 2015 09:05:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution target_milestone
Message-ID: <bug-59955-4-FwSkJw4oJ9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59955-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59955-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg02591.txt.bz2
Content-length: 488

https://gcc.gnu.org/bugzilla/show_bug.cgi?idY955

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |6.0

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


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

* [Bug c++/65943] template keyword required for base-specifier that names member of the current instantiation
  2015-04-30  9:04 [Bug c++/65943] New: template keyword required for base-specifier that names member of the current instantiation redi at gcc dot gnu.org
@ 2020-11-10 17:38 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-10 17:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed by r10-7403 for PR c++/94057

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

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

end of thread, other threads:[~2020-11-10 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30  9:04 [Bug c++/65943] New: template keyword required for base-specifier that names member of the current instantiation redi at gcc dot gnu.org
2020-11-10 17:38 ` [Bug c++/65943] " 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).