This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20332] poor diagnostic


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]