Standard Library fails with -Wall -Werror -Weffc++

Paul Panaro webmaster@netscape.com
Fri Jan 2 12:48:00 GMT 1998


The standard library does not totally follow the "meyer rules" (I do not
know what to call them).  I have -Wall -Werror -Weffc++ options and many
of the files in egcs-1.0/include/g++/ give warnings (and therefore
errors because of -Werror).  Is this going to be fixed?

pjp

here are some of the warnings/errors:


egcs-1.0/include/g++/iostream.h:237: warning: `operator=' should return
a reference to `*this'
egcs-1.0/include/g++/iostream.h:244: warning: `operator=' should return
a reference to `*this'
egcs-1.0/include/g++/stl_function.h:400: warning:
`subtractive_rng::index1' should be initialized in the member
initialization list
egcs-1.0/include/g++/stl_function.h:400: warning:
`subtractive_rng::index2' should be initialized in the member
initialization list
egcs-1.0/include/g++/stl_function.h:401: warning:
`subtractive_rng::index1' should be initialized in the member
initialization list
egcs-1.0/include/g++/stl_function.h:401: warning:
`subtractive_rng::index2' should be initialized in the member
initialization list
egcs-1.0/include/g++/stl_iterator.h:325: warning: postfix
`back_insert_iterator<Container>::operator ++(int)' should return
`back_insert_iterator<Container>'
egcs-1.0/include/g++/stl_iterator.h:363: warning: postfix
`front_insert_iterator<Container>::operator ++(int)' should return
`front_insert_iterator<Container>'
egcs-1.0/include/g++/stl_iterator.h:404: warning: postfix
`insert_iterator<Container>::operator ++(int)' should return
`insert_iterator<Container>'
egcs-1.0/include/g++/stl_iterator.h:824: warning: postfix
`ostream_iterator<T>::operator ++(int)' should return
`ostream_iterator<T>'
egcs-1.0/include/g++/stl_tree.h:524: warning:
`rb_tree<basic_string<char,string_char_traits<char> >,pair<const
basic_string<char,string_char_traits<char>
>,ParameterValue>,select1st<pair<const
basic_string<char,string_char_traits<char> >,ParameterValue>\
 >,less<basic_string<char,string_char_traits<char> >
>,__default_alloc_template<false,0> >::header' should be initialized in
the member initialization list
egcs-1.0/include/g++/stl_tree.h:524: warning: `rb_tree<int,pair<const
int,int>,select1st<pair<const int,int>
>,less<int>,__default_alloc_template<false,0> >::header' should be
initialized in the member initialization list
egcs-1.0/include/g++/stl_vector.h:103: warning: `vector<Program
*,__default_alloc_template<false,0> >::end_of_storage' should be
initialized in the member initialization list
egcs-1.0/include/g++/stl_vector.h:103: warning: `vector<Program
*,__default_alloc_template<false,0> >::finish' should be initialized in
the member initialization list
egcs-1.0/include/g++/stl_vector.h:103: warning: `vector<Program
*,__default_alloc_template<false,0> >::start' should be initialized in
the member initialization list






More information about the Gcc-bugs mailing list