This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20332] poor diagnostic
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2005 10:22:59 -0000
- Subject: [Bug c++/20332] poor diagnostic
- References: <20050305102011.20332.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From igodard at pacbell dot net 2005-03-05 10:22 -------
Comeau gives:
Comeau C/C++ 4.3.3 (Aug 6 2003 15:13:37) for ONLINE_EVALUATION_BETA1
Copyright 1988-2003 Comeau Computing. All rights reserved.
MODE:strict errors C++
"ComeauTest.c", line 3: error: initial value of reference to non-const must be an
lvalue
bar& b = bar();
^
"ComeauTest.c", line 5: error: initial value of reference to non-const must be an
lvalue
void foo(bar& b = bar()) {}
^
2 errors detected in the compilation of "ComeauTest.c".
IMHO this is better than the second and worse than the first that gcc gives.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20332