This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14912] New: Do not print default template arguments in error messages
- From: "schnetter at aei dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Apr 2004 19:32:02 -0000
- Subject: [Bug c++/14912] New: Do not print default template arguments in error messages
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Errors or warnings in templated functions often print a ridiculously long type
name, especially when the STL is involved, as in
/home/eschnett/Calpha/Cactus/configs/einstein-gfortran-debug/build/CarpetRegrid/centre.cc:
In function `int CarpetRegrid::Centre(constcGH*, constgh<3>&, int, int, int,
constCarpet::jjvect&, constCarpet::jjvect&, constCarpet::jjvect&,
constCarpet::jjvect&,
__gnu_norm::vector<__gnu_norm::vector<__gnu_norm::vector<bbox<int, 3>,
std::allocator<bbox<int, 3> > >, std::allocator<__gnu_norm::vector<bbox<int,
3>, std::allocator<bbox<int, 3> > > > >,
std::allocator<__gnu_norm::vector<__gnu_norm::vector<bbox<int, 3>,
std::allocator<bbox<int, 3> > >, std::allocator<__gnu_norm::vector<bbox<int,
3>, std::allocator<bbox<int, 3> > > > > > >&,
__gnu_norm::vector<__gnu_norm::vector<vect<vect<bool, 2>, 3>,
std::allocator<vect<vect<bool, 2>, 3> > >,
std::allocator<__gnu_norm::vector<vect<vect<bool, 2>, 3>,
std::allocator<vect<vect<bool, 2>, 3> > > > >&,
__gnu_norm::vector<__gnu_norm::vector<int, std::allocator<int> >,
std::allocator<__gnu_norm::vector<int, std::allocator<int> > > >&)':
/home/eschnett/Calpha/Cactus/configs/einstein-gfortran-debug/build/CarpetRegrid/centre.cc:46:
warning: comparison between signed and unsigned integer expressions
I never typed in all this "allocator" and "__gnu_norm" stuff. I assume these
are default template parameters. Would it be possible to not print them? It
would make the warning message readable.
Oh. I just see that there is no space after the "const" keywords. Is that
intentional?
--
Summary: Do not print default template arguments in error
messages
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14912