public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ehrhardt at mathematik dot uni-ulm dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/11694] ICE with missing typename/template keywords
Date: Tue, 29 Jul 2003 09:57:00 -0000	[thread overview]
Message-ID: <20030729095745.27565.qmail@sources.redhat.com> (raw)
In-Reply-To: <20030728135514.11694.cholm@nbi.dk>

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


ehrhardt at mathematik dot uni-ulm dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
           Priority|P2                          |P3
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-29 09:57:44
               date|                            |
            Summary|Template member class of    |ICE with missing
                   |template class mix-up       |typename/template keywords
   Target Milestone|3.4                         |3.3.2
            Version|3.2.2                       |3.3.1


------- Additional Comments From ehrhardt at mathematik dot uni-ulm dot de  2003-07-29 09:57 -------
The code is invalid. This line:

	typedef foo<A, A>::helper<1> helper_type;

must be written as

	typedef typename foo<A, A>::template helper<1> helper_type;

However, gcc should not issue an Internal Compiler Error. This is
fixed in 3.4. Note that there are two different ICEs, one if both
typename and template are are missing. There's another one if
template is there but typename is missing.

Reduced example:

template <typename , typename >
struct foo {
	template <int> struct helper { };   
};
template <typename A>
struct bar : public foo<A, A>
{ 
	typedef foo<A, A>::helper<1> helper_type;
};
bar<double> b1();

   regards  Christian


  parent reply	other threads:[~2003-07-29  9:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-28 13:55 [Bug c++/11694] New: Template member class of template class mix-up cholm at nbi dot dk
2003-07-28 14:08 ` [Bug c++/11694] " pinskia at physics dot uc dot edu
2003-07-29  9:57 ` ehrhardt at mathematik dot uni-ulm dot de [this message]
2003-07-29 12:16 ` [Bug c++/11694] [3.3 Regression] ICE with missing typename/template keywords pinskia at physics dot uc dot edu
2003-10-16  9:24 ` mmitchel at gcc dot gnu dot org
2003-10-19 22:18 ` pinskia at gcc dot gnu dot org

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=20030729095745.27565.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).