[Bug c++/20332] poor diagnostic

igodard at pacbell dot net gcc-bugzilla@gcc.gnu.org
Sat Mar 5 10:23:00 GMT 2005


------- 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



More information about the Gcc-bugs mailing list