ublas icon indicating copy to clipboard operation
ublas copied to clipboard

GCC ≥ 4.8 warns about unused local typedefs

Open the-nic opened this issue 11 years ago • 3 comments

Using gcc ≥ 4.8 causes a lot of warnings about unused local typedefs to be emitted, eg. (there may be more):

include/boost/numeric/ublas/triangular.hpp:1862:46: warning: typedef ‘difference_type’ locally defined but not used [-Wunused-local-typedefs]
include/boost/numeric/ublas/detail/matrix_assign.hpp:969:40: warning: typedef ‘value_type’ locally defined but not used [-Wunused-local-typedefs]
include/boost/numeric/ublas/detail/matrix_assign.hpp:1280:39: warning: typedef ‘size_type’ locally defined but not used [-Wunused-local-typedefs]

..and so on. This causes a lot of noise in compiler output

the-nic avatar Sep 18 '14 12:09 the-nic

Many of those have been dealt with but cannot be all catched by the unit tests. If after release 1.57 some of them still remain please repost them so we can get rid of them.

Thanks!

nasosi avatar Sep 29 '14 14:09 nasosi

Hereafter, two warnings which have remained (MinGW gcc 4.9.1):

boost_1_57_0/include/boost/numeric/ublas/detail/matrix_assign.hpp:1262:39: warning: typedef 'size_type' locally defined but not used [-Wunused-local-typedefs]
boost_1_57_0/include/boost/numeric/ublas/detail/matrix_assign.hpp:1288:39: warning: typedef 'size_type' locally defined but not used [-Wunused-local-typedefs]

Kind Regards,

cmakassikis avatar Nov 25 '14 13:11 cmakassikis

Thanks for reporting!

This shouldn't be a problem because the typedef is used right below but gcc has a different opinion. Anyway to avoid it I pushed a fix in the develop branch.

nasosi avatar Dec 15 '14 21:12 nasosi