public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c++/5931: ICE when using template class that is child if another template class
Date: Mon, 08 Jul 2002 17:06:00 -0000	[thread overview]
Message-ID: <20020709000602.26297.qmail@sources.redhat.com> (raw)

The following reply was made to PR c++/5931; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<f_ker@yahoo.co.uk>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>
Cc:  
Subject: Re: c++/5931: ICE when using template class that is child if another template class
Date: Tue, 9 Jul 2002 01:56:47 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=5931
 
 Notice that the code is not legal C++. The snippet reported by Reichelt is:
 
 ------------------------snip here------------------------
 template <typename T, typename U> struct A
  {
      template <typename V> class SubA {};
  };
 
  template <typename T> struct B : public A<T,int>::SubA<int> {};
 
  B<int> b;
  ------------------------snip here------------------------
 
 which is not legal C++, because it's accessing a nested template without the
 explicit template keyword. The correct version:
 
 ------------------------snip here------------------------
  template <typename T> struct B : public A<T,int>::template SubA<int> {};
 ------------------------snip here------------------------
 
 which correctly compiles on my GCC 3.1. So the PR type should be changed to
 ice-on-illegal-code. This should also solve the reporter's compilation
 problems.
 
 Giovanni Bajo
 
 P.S: I'm not subscibed to any GCC list, so please include my adress in CC
 list if needed.
 


             reply	other threads:[~2002-07-09  0:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08 17:06 Giovanni Bajo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-22 21:16 bangerth
2002-03-19  1:06 Jason Merrill
2002-03-18 18:36 F ker
2002-03-18  9:40 jason
2002-03-18  9:22 jason
2002-03-13  5:16 Reichelt
2002-03-12 19:46 f_ker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020709000602.26297.qmail@sources.redhat.com \
    --to=giovannibajo@libero.it \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).