public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17763] [3.4/4.0/4.1 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
@ 2005-10-18 15:44 ` mmitchel at gcc dot gnu dot org
2005-10-31 0:31 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-18 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from mmitchel at gcc dot gnu dot org 2005-10-18 15:44 -------
The confusing use of typedefs is now corrected. The spurious space after the
"." remains.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [3.4/4.0/4.1 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
2005-10-18 15:44 ` [Bug c++/17763] [3.4/4.0/4.1 Regression] Wrong context in error message for template parameter mmitchel at gcc dot gnu dot org
@ 2005-10-31 0:31 ` mmitchel at gcc dot gnu dot org
2006-03-11 3:20 ` [Bug c++/17763] [3.4/4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31 0:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from mmitchel at gcc dot gnu dot org 2005-10-31 00:31 -------
The extra-space issue will never block a release; downgrading to P5. The fix
for PR 23293 may be revised, which might cause an upgrade to the priority of
this PR, if the revised fix results in the original error messages in this PR
re-appearing.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [3.4/4.0/4.1/4.2 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
2005-10-18 15:44 ` [Bug c++/17763] [3.4/4.0/4.1 Regression] Wrong context in error message for template parameter mmitchel at gcc dot gnu dot org
2005-10-31 0:31 ` mmitchel at gcc dot gnu dot org
@ 2006-03-11 3:20 ` mmitchel at gcc dot gnu dot org
2007-01-18 3:05 ` [Bug c++/17763] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-03-11 3:20 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.3 |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2/4.3 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-03-11 3:20 ` [Bug c++/17763] [3.4/4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
@ 2007-01-18 3:05 ` gdr at gcc dot gnu dot org
2007-01-21 21:49 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-01-18 3:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from gdr at gcc dot gnu dot org 2007-01-18 03:04 -------
Won't fix for GCC-4.0.x
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.4 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2/4.3 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2007-01-18 3:05 ` [Bug c++/17763] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
@ 2007-01-21 21:49 ` pinskia at gcc dot gnu dot org
2007-02-14 9:39 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-21 21:49 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2/4.3 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2007-01-21 21:49 ` pinskia at gcc dot gnu dot org
@ 2007-02-14 9:39 ` mmitchel at gcc dot gnu dot org
2007-08-10 12:29 ` pcarlini at suse dot de
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:39 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2/4.3 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2007-02-14 9:39 ` mmitchel at gcc dot gnu dot org
@ 2007-08-10 12:29 ` pcarlini at suse dot de
2007-08-10 14:58 ` paolo at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pcarlini at suse dot de @ 2007-08-10 12:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from pcarlini at suse dot de 2007-08-10 12:28 -------
Working on the spurious space issue...
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2/4.3 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2007-08-10 12:29 ` pcarlini at suse dot de
@ 2007-08-10 14:58 ` paolo at gcc dot gnu dot org
2007-08-10 18:05 ` [Bug c++/17763] [4.0/4.1/4.2 " paolo at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-08-10 14:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from paolo at gcc dot gnu dot org 2007-08-10 14:58 -------
Subject: Bug 17763
Author: paolo
Date: Fri Aug 10 14:57:52 2007
New Revision: 127335
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127335
Log:
/cp
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* error.c (dump_expr): Consistently use the *_cxx_*
variants of the pretty-print functions.
/testsuite
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* g++.dg/other/error16.C: New.
Added:
trunk/gcc/testsuite/g++.dg/other/error16.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2007-08-10 14:58 ` paolo at gcc dot gnu dot org
@ 2007-08-10 18:05 ` paolo at gcc dot gnu dot org
2007-08-10 18:05 ` paolo at gcc dot gnu dot org
2007-08-10 18:06 ` pcarlini at suse dot de
10 siblings, 0 replies; 13+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-08-10 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from paolo at gcc dot gnu dot org 2007-08-10 18:05 -------
Subject: Bug 17763
Author: paolo
Date: Fri Aug 10 18:05:07 2007
New Revision: 127346
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127346
Log:
/cp
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* error.c (dump_expr): Consistently use the *_cxx_*
variants of the pretty-print functions.
/testsuite
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* g++.dg/other/error16.C: New.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/other/error16.C
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/error.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2007-08-10 18:05 ` [Bug c++/17763] [4.0/4.1/4.2 " paolo at gcc dot gnu dot org
@ 2007-08-10 18:05 ` paolo at gcc dot gnu dot org
2007-08-10 18:06 ` pcarlini at suse dot de
10 siblings, 0 replies; 13+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-08-10 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from paolo at gcc dot gnu dot org 2007-08-10 18:05 -------
Subject: Bug 17763
Author: paolo
Date: Fri Aug 10 18:04:46 2007
New Revision: 127345
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127345
Log:
/cp
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* error.c (dump_expr): Consistently use the *_cxx_*
variants of the pretty-print functions.
/testsuite
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* g++.dg/other/error16.C: New.
Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/other/error16.C
Modified:
branches/gcc-4_2-branch/gcc/cp/ChangeLog
branches/gcc-4_2-branch/gcc/cp/error.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] [4.0/4.1/4.2 Regression] Wrong context in error message for template parameter
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2007-08-10 18:05 ` paolo at gcc dot gnu dot org
@ 2007-08-10 18:06 ` pcarlini at suse dot de
10 siblings, 0 replies; 13+ messages in thread
From: pcarlini at suse dot de @ 2007-08-10 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from pcarlini at suse dot de 2007-08-10 18:06 -------
Fixed for 4.1.3.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/17763] New: Wrong context in error message for template parameter
@ 2004-10-01 2:10 solodon at mail dot com
2005-08-08 22:10 ` [Bug c++/17763] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-27 16:22 ` mmitchel at gcc dot gnu dot org
0 siblings, 2 replies; 13+ messages in thread
From: solodon at mail dot com @ 2004-10-01 2:10 UTC (permalink / raw)
To: gcc-bugs
It seems that in some cases g++ reports in diagnostic messages type names of
template parameters based on the names used in the first instantiation of the
template and not those that appear in the context of the error. Roughly if A,B,X
and Y are all typedef-ed to int, then g++ can report error about incorrect usage
of class T<X,Y> where it has to report incorrect usage of class T<A,B>. Here is
a small application that reproduces this problem in G++ 3.2 and accordingly to
my professor in 3.4:
#include <map>
int main()
{
typedef int X;
typedef int Y;
typedef std::map<X,Y> XYMap; // X and Y happen to be int
XYMap xy; // This will instantiate std::map<int,int>
xy[0] = 1;
typedef int A;
typedef int B;
typedef std::map<A,B> ABMap; // A and B also happen to be int
typedef std::pair<A,B> ABPair;
ABMap ab; // Code for this was already instantiated higher!
ABPair p(0,1); // Pair of A B. Not relevant, required to generate error
ab[0] = 1;
ABMap::iterator q = ab.begin();
// Here we get an error message, because map's value_type is pair<const A, B>
// and not pair<A, B> as we try to compare it to.
// BUT: Look which types are reported as types of map's value_type:
// they are X and Y which are completely irrelevant to ABMap!
// It seems g++ just peeks the type names of the first instantiation with such
// actual types, which actually generates code for both maps.
assert(*q == p);
return 0;
}
Here is what compiler gives when I run it as: gcc -v -save-temps err_rep.cpp
==8<=========================================================================
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/cpp0 -lang-c++ -D__GNUG__=3
-D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=2 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__
-Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux
-Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386
-Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ err_rep.cpp err_rep.ii
GNU CPP version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/3.2.2
/usr/include/c++/3.2.2/i386-redhat-linux
/usr/include/c++/3.2.2/backward
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/cc1plus -fpreprocessed err_rep.ii
-quiet -dumpbase err_rep.cpp -version -o err_rep.s
GNU CPP version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) (i386-redhat-linux)
compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5).
err_rep.cpp: In function `int main()':
err_rep.cpp:30: no match for `std::pair<const X, Y>& == main()::ABPair&'
operator
==8<=========================================================================
Line 30 corresponds to line with assert.
--
Summary: Wrong context in error message for template parameter
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: solodon at mail dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: Configured with: ../configure --prefix=/usr --
mandir=/usr/share/
GCC host triplet: gcc version 3.2.2 20030222
GCC target triplet: Red Hat Linux 3.2.2-5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-08-10 18:06 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-17763-9397@http.gcc.gnu.org/bugzilla/>
2005-10-18 15:44 ` [Bug c++/17763] [3.4/4.0/4.1 Regression] Wrong context in error message for template parameter mmitchel at gcc dot gnu dot org
2005-10-31 0:31 ` mmitchel at gcc dot gnu dot org
2006-03-11 3:20 ` [Bug c++/17763] [3.4/4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2007-01-18 3:05 ` [Bug c++/17763] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-01-21 21:49 ` pinskia at gcc dot gnu dot org
2007-02-14 9:39 ` mmitchel at gcc dot gnu dot org
2007-08-10 12:29 ` pcarlini at suse dot de
2007-08-10 14:58 ` paolo at gcc dot gnu dot org
2007-08-10 18:05 ` [Bug c++/17763] [4.0/4.1/4.2 " paolo at gcc dot gnu dot org
2007-08-10 18:05 ` paolo at gcc dot gnu dot org
2007-08-10 18:06 ` pcarlini at suse dot de
2004-10-01 2:10 [Bug c++/17763] New: " solodon at mail dot com
2005-08-08 22:10 ` [Bug c++/17763] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-27 16:22 ` mmitchel 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).