Degraded C++ error messages.

Carlo Wood carlo@alinoe.com
Fri Nov 7 15:32:00 GMT 2003


Hiya,

this is going to be a thread to which I will add unreadable
or very much degraded error message of g++.  Being mainly
a *user* of g++, it is my experience that the error messages
have gotten less and less practical value.

Example 1.

5:  std::vector<int> v;
6:  int* p = v.begin()->base();

~>g++-2.95.3 troep.cc
troep.cc: In function `int main()':
troep.cc:6: request for member `base' in `*v.vector<int,allocator<int> >::begin()', which is of non-aggregate type `int'

~>g++-3.3.2 troep.cc
troep.cc: In function `int main()':
troep.cc:6: error: request for member `base' in `*(&std::vector<_Tp,
   _Alloc>::begin() [with _Tp = int, _Alloc =
   std::allocator<int>]())->__gnu_cxx::__normal_iterator<_Iterator,
   _Container>::operator->() const [with _Iterator = int*, _Container =
   std::vector<int, std::allocator<int> >]()', which is of non-aggregate type `
   int'

~>g++-cvs-3.4 troep.cc
troep.cc: In function `int main()':
troep.cc:6: error: expected type-name
troep.cc:6: error: expected `::'
troep.cc:6: error: expected `~'
troep.cc:6: error: expected identifier


-- 
Carlo Wood <carlo@alinoe.com>



More information about the Libstdc++ mailing list