public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11616] New: Error message "instantiated from here" gives wrong location
@ 2003-07-21 16:31 reichelt at gcc dot gnu dot org
2003-07-21 16:59 ` [Bug c++/11616] " bangerth at dealii dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-07-21 16:31 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
Summary: Error message "instantiated from here" gives wrong
location
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Keywords: diagnostic
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
Consider the following invalid code:
----------------------------------------------
1 template <int> struct A
2 {
3 static const int i=0;
4 };
5
6 int baz() { return A<0>::i; }
7
8 struct B
9 {
10 static void foo (int);
11 };
12
13 template <typename T> struct C
14 {
15 virtual void bar() const { T::foo(); }
16 };
17
18 C<B> c;
----------------------------------------------
Compiling this with g++ gives the following error message:
file.cc: In member function `void C<T>::bar() const [with T = B]':
file.cc:6: instantiated from here
file.cc:15: error: no matching function for call to `B::foo()'
file.cc:10: note: candidates are: static void B::foo(int)
The line number "6" in line 2 of the error message is obviously bogus.
It should read "18" instead.
The bug happened to me in a more complex situation where even the
file name was wrong. In such a case it is very difficult to find the
point of instantiation by hand. :-(
All versions since 2.95.x seem to be affected (including 3.3 branch and
mainline).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
@ 2003-07-21 16:59 ` bangerth at dealii dot org
2003-08-05 19:10 ` pinskia at physics dot uc dot edu
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2003-07-21 16:59 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-07-21 16:59:10
date| |
------- Additional Comments From bangerth at dealii dot org 2003-07-21 16:59 -------
Confirmed indeed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
2003-07-21 16:59 ` [Bug c++/11616] " bangerth at dealii dot org
@ 2003-08-05 19:10 ` pinskia at physics dot uc dot edu
2003-08-23 1:55 ` dhazeghi at yahoo dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-05 19:10 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-07-21 16:59:10 |2003-08-05 19:10:07
date| |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-08-05 19:10 -------
I want to say the line mappings stack is wrong (or got currupted).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
2003-07-21 16:59 ` [Bug c++/11616] " bangerth at dealii dot org
2003-08-05 19:10 ` pinskia at physics dot uc dot edu
@ 2003-08-23 1:55 ` dhazeghi at yahoo dot com
2003-11-05 14:01 ` lerdsuwa at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23 1:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2003-08-23 1:55 ` dhazeghi at yahoo dot com
@ 2003-11-05 14:01 ` lerdsuwa at gcc dot gnu dot org
2003-11-05 14:38 ` lerdsuwa at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-05 14:01 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
lerdsuwa at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |lerdsuwa at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-11-05 14:01 -------
Patch in progress.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2003-11-05 14:01 ` lerdsuwa at gcc dot gnu dot org
@ 2003-11-05 14:38 ` lerdsuwa at gcc dot gnu dot org
2003-11-05 14:38 ` cvs-commit at gcc dot gnu dot org
2003-11-05 14:58 ` lerdsuwa at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-05 14:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
lerdsuwa at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-11-05 14:38 -------
Fixed in the mainline.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2003-11-05 14:38 ` lerdsuwa at gcc dot gnu dot org
@ 2003-11-05 14:38 ` cvs-commit at gcc dot gnu dot org
2003-11-05 14:58 ` lerdsuwa at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-05 14:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-11-05 14:38 -------
Subject: Bug 11616
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: lerdsuwa@gcc.gnu.org 2003-11-05 14:37:58
Modified files:
gcc/cp : ChangeLog pt.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: instantiate5.C
Log message:
PR c++/11616
* pt.c (instantiate_pending_templates): Save and restore
input_location.
* g++.dg/template/instantiate5.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3749&r2=1.3750
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.791&r2=1.792
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3167&r2=1.3168
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/instantiate5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11616] Error message "instantiated from here" gives wrong location
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2003-11-05 14:38 ` cvs-commit at gcc dot gnu dot org
@ 2003-11-05 14:58 ` lerdsuwa at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-05 14:58 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11616
lerdsuwa at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-11-05 14:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 16:31 [Bug c++/11616] New: Error message "instantiated from here" gives wrong location reichelt at gcc dot gnu dot org
2003-07-21 16:59 ` [Bug c++/11616] " bangerth at dealii dot org
2003-08-05 19:10 ` pinskia at physics dot uc dot edu
2003-08-23 1:55 ` dhazeghi at yahoo dot com
2003-11-05 14:01 ` lerdsuwa at gcc dot gnu dot org
2003-11-05 14:38 ` lerdsuwa at gcc dot gnu dot org
2003-11-05 14:38 ` cvs-commit at gcc dot gnu dot org
2003-11-05 14:58 ` lerdsuwa at gcc dot gnu dot 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).