public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99] Bug in template type in error message.
Date: Fri, 04 Mar 2005 15:05:00 -0000	[thread overview]
Message-ID: <20050304150516.20771.qmail@sourceware.org> (raw)
In-Reply-To: <20000312002600.99.martin@loewis.home.cs.tu-berlin.de>


------- Additional Comments From bangerth at dealii dot org  2005-03-04 15:05 -------
Here's another very nice example from PR 20313: 
------------------------- 
template<int j> struct s; 
template<int i> s<i>::s(int j) {} 
------------------------- 
Note that the definition of the constructor is invalid because the struct 
isn't complete. Here's what we get: 
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc 
x.cc:2: error: invalid use of undefined type ?struct s<j>? 
x.cc:1: error: declaration of ?struct s<j>? 
x.cc:2: error: template definition of non-template ?s<j>::s(int)? 
 
Note how the compiler uses the template argument 'j', although we use 
template argument 'i' in line 2! 
 
W. 

-- 


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


  parent reply	other threads:[~2005-03-04 15:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20000312002600.99.martin@loewis.home.cs.tu-berlin.de>
2004-05-27 20:27 ` pinskia at gcc dot gnu dot org
2004-07-19 18:40 ` pinskia at gcc dot gnu dot org
2004-09-26  0:44 ` pinskia at gcc dot gnu dot org
2004-10-01 13:16 ` bangerth at dealii dot org
2005-03-04 14:51 ` pinskia at gcc dot gnu dot org
2005-03-04 15:05 ` bangerth at dealii dot org [this message]
2005-04-08 19:38 ` bangerth at dealii dot org
     [not found] <bug-99-797@http.gcc.gnu.org/bugzilla/>
2005-11-07 15:38 ` reichelt at gcc dot gnu dot org
2007-03-29 15:28 ` bangerth at dealii dot org
2007-03-29 15:43   ` Gabriel Dos Reis
2007-03-29 15:44 ` gdr at cs dot tamu dot edu
2008-02-28 17:08 ` pinskia at gcc dot gnu dot org
2010-06-05 23:38 ` manu at gcc dot gnu dot org
2010-07-03 19:59 ` manu at gcc dot gnu dot org
     [not found] <bug-99-4@http.gcc.gnu.org/bugzilla/>
2012-10-09 18:48 ` manu at gcc dot gnu.org
2014-04-13 16:49 ` manu at gcc dot gnu.org
2014-04-13 18:09 ` manu at gcc dot gnu.org
2014-04-13 19:25 ` manu at gcc dot gnu.org
2021-09-06  6:14 ` pinskia at gcc dot gnu.org
2021-10-01 10:06 ` egallager at gcc dot gnu.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=20050304150516.20771.qmail@sourceware.org \
    --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).