This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16068] Bad error message
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2004 01:13:22 -0000
- Subject: [Bug c++/16068] Bad error message
- References: <20040618233300.16068.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-19 01:13 -------
ICC 6.0 gives:
pr16070.cc
pr16070.cc(9): error: no operator "<<" matches these operands
operand types are: A << <unknown-type>
a << f;
^
compilation aborted for pr16070.cc (code 2)
Reduced:
template <class T> void f(T);
class A{};
template<typename T>
void operator<<(const A&, const T& t) {}
int main() { A a; a << f; }
3.0.4 and 2.95.3 gives:
tin:~/src/gnu/gcctest>~/ia32_linux_gcc3_0/bin/gcc pr16070.cc
pr16070.cc: In function `int main()':
pr16070.cc:9: no match for `A& << <unknown type>' operator
tin:~/src/gnu/gcctest>~/ia32_linux_gcc2_95//bin/gcc pr16070.cc
pr16070.cc: In function `int main()':
pr16070.cc:9: no match for `A & << {unknown type}'
They are slightly better but still bad (really ICC's diagnostic is just as bad as GCC's here).
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2004-06-19 01:13:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16068