[Bug c++/12390] Wrong line number for friend declaration of invalid template class

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Wed Sep 24 21:01:00 GMT 2003


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

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



------- Additional Comments From gdr at integrable-solutions dot net  2003-09-24 19:04 -------
Subject: Re:  New: Wrong line number for friend declaration of invalid template class

"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| bug.cc: In instantiation of `A<void>':
| bug.cc:11:   instantiated from here
| bug.cc:1: error: template parameter `class <template-parameter-1-1>'

[...]

| In addition, line 3 of the error message changed w.r.t. 3.3 branch,
| where it reads
| 
| bug.cc: In instantiation of `A<void>':
| bug.cc:11:   instantiated from here
| bug.cc:1: error: template parameter `class <anonymous template type parameter>'
| 
| I don't know whether this was on purpose or just by accident.

it was on purpose.  Previoulsy (I can't remember off hand which PR) we
issued bogus and incomprehensible messages in similar cases.  Then I
decided to use the canonical representation of template parameters,
i.e. De Brujin's

  template-parameter-<level>-<1 + index>

which means that the above is the first template parameter at the
first level.

-- Gaby



More information about the Gcc-bugs mailing list