public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8570: line number in error message is badly placed with illegal template friend declaration
@ 2002-11-20 7:00 llib
0 siblings, 0 replies; 2+ messages in thread
From: llib @ 2002-11-20 7:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 8570
>Category: c++
>Synopsis: line number in error message is badly placed with illegal template friend declaration
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 13 20:56:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Bill Clarke
>Release: 3.2
>Organization:
>Environment:
System: SunOS alto 5.9 Generic sun4u sparc SUNW,Sun-Blade-1000
Architecture: sun4
host: sparc-sun-solaris2.9
build: sparc-sun-solaris2.9
target: sparc-sun-solaris2.9
configured with: ../gcc-3.2/configure --prefix=/space/bill/util --with-cpu=ultrasparc --enable-languages=c,c++,f77
>Description:
The line number in an error message with illegal is badly placed, nowhere
near the offending friend declaration.
>How-To-Repeat:
With this file:
// templ-friend-bug.cc
template <typename T, typename P>
class X {
public:
X() { }
private:
template <typename U> friend class X;
};
X<int, int> i;
// end
compiling with g++ 3.2 gives the following message:
? g++ -c templ-friend-bug.cc
templ-friend-bug.cc: In instantiation of `X<int, int>':
templ-friend-bug.cc:11: instantiated from here
templ-friend-bug.cc:3: previous declaration `template<class T, class P> class X'
templ-friend-bug.cc:3: used 2 template parameters instead of 1
?
the same occurs with 3.2.1 pre (20021110) and 3.3 pre (20021110)
it would be nice if it mentioned line 8 somewhere in the error message
(presumably the last line). it took a great deal of time to find the
problem in my code with a rather large template.
my original code also got an ICE in 3.3 pre, but this stripped down version
didn't. i'll look into that separately.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/8570: line number in error message is badly placed with illegal template friend declaration
@ 2002-11-20 18:01 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-11-20 18:01 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, llib, nobody
Synopsis: line number in error message is badly placed with illegal template friend declaration
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Nov 14 07:01:33 2002
State-Changed-Why:
Confirmed. I think that this is probably related to PR 2019.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8570
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-14 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 7:00 c++/8570: line number in error message is badly placed with illegal template friend declaration llib
2002-11-20 18:01 bangerth
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).