[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] -Weffc++

From: Greg Chicares
Subject: [lmi] -Weffc++
Date: Thu, 9 Mar 2017 00:55:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

It had been a while since I built with '-Weffc++', so I did it again
[any 'build_type' not specifically recognized by the makefiles simply
creates its own build directory, BTW]:

make $coefficiency all build_type=meyers CXXFLAGS='-Weffc++' 2>&1 \
  |grep 'Werror=effc' \
  |sed -e'/^\/opt\/lmi\/third_party/d' \
       -e'/^\/opt\/lmi\/local\/include/d' \
       -e'/^\/opt\/lmi\/src\/lmi\/tools/d' \

Most of the diagnostics refer to data members that aren't initialized
in an appropriate place (although the message specifies the ctor-
initializer, the diagnostic seems not to be issued for non-static
data members that have a braced-init-list in the class's member-

/opt/lmi/src/lmi[0]$wc -l ../effc 
4596 ../effc

/opt/lmi/src/lmi[0]$<../effc grep 'should be initialized in the member 
initialization list' |wc -l

The other 66 lines were all of this worrisome variety:

/opt/lmi/src/lmi/getopt.hpp:136:14: error: 'class GetOpt' has pointer data 
members [-Werror=effc++]
/opt/lmi/src/lmi/getopt.hpp:136:14: error:   but does not override 
'GetOpt(const GetOpt&)' [-Werror=effc++]
/opt/lmi/src/lmi/getopt.hpp:136:14: error:   or 'operator=(const GetOpt&)' 

so I fixed them in commit 040e7c090ace375d5668f0a5701608d8cc0a1eb1.
Fortunately none of the deleted special member functions were used.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]