When I lint my code, using boost 1-32, using PC-Lint I get some issues on the Boost code. I use 'PC-lint for C/C++ (NT) Vers. 8.00r, Copyright Gimpel Software 1985-2005' so the new patch that should deal with Boost better. These are the issues; BOOST_STATIC_CONSTANT(bool, value = helper::value); C:\Boost\include\boost-1_32\boost\type_traits\is_enum.hpp(143): error 1061: (Error -- public member 'boost::mpl::bool_<<1>>::value' is not accessible through non-public inheritance) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) C:\Boost\include\boost-1_32\boost\mpl\aux_\has_apply.hpp(22): error 64: (Error -- Type mismatch (arg. no. 1) (volatile const boost::mpl::aux::has_apply_wrapper_<T> * = boost::mpl::aux::has_apply_wrapper_<T> *)) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) C:\Boost\include\boost-1_32\boost\mpl\aux_\has_tag.hpp(20): error 64: (Error -- Type mismatch (arg. no. 1) (volatile const boost::mpl::aux::has_tag_wrapper_<T> * = boost::mpl::aux::has_tag_wrapper_<T> *)) Are these Boost or PC-Lint issues? Okko These are descriptions of the issues; 1061 String member 'Symbol' is not accessible through non-public inheritance -- There is an attempt to access a private, protected or public member (the text of the message indicates which kind as well as which member) of a class through a class derived from the original. There is an access violation (see 1060 for the more common access violation) critically dependent on the fact that the inheritance relationship is non-public. [11 section 11.2] 64 Type mismatch (Context) (TypeDiff) -- There was a mismatch in types across an assignment (or implied assignment, see Context). TypeDiff specifies the type difference. See options -epn, -eps, -epu, -epp (Section 5.2 Error Inhibition Options) to suppress this message when assigning some kinds of pointers.
For boost 1-33 only the first issue exists; BOOST_STATIC_CONSTANT(bool, value = helper::value); C:\libs\Boost\include\boost-1_33\boost\type_traits\is_enum.hpp(153): error 1061: (Error -- public member 'boost::mpl::integral_c<<1>,<2>>::value' is not accessible through non-public inheritance) Okko Okko Willeboordse wrote:
When I lint my code, using boost 1-32, using PC-Lint I get some issues on the Boost code. I use 'PC-lint for C/C++ (NT) Vers. 8.00r, Copyright Gimpel Software 1985-2005' so the new patch that should deal with Boost better.
These are the issues; BOOST_STATIC_CONSTANT(bool, value = helper::value); C:\Boost\include\boost-1_32\boost\type_traits\is_enum.hpp(143): error 1061: (Error -- public member 'boost::mpl::bool_<<1>>::value' is not accessible through non-public inheritance) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) C:\Boost\include\boost-1_32\boost\mpl\aux_\has_apply.hpp(22): error 64: (Error -- Type mismatch (arg. no. 1) (volatile const boost::mpl::aux::has_apply_wrapper_<T> * = boost::mpl::aux::has_apply_wrapper_<T> *)) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) C:\Boost\include\boost-1_32\boost\mpl\aux_\has_tag.hpp(20): error 64: (Error -- Type mismatch (arg. no. 1) (volatile const boost::mpl::aux::has_tag_wrapper_<T> * = boost::mpl::aux::has_tag_wrapper_<T> *))
Are these Boost or PC-Lint issues?
Okko
These are descriptions of the issues;
1061 String member 'Symbol' is not accessible through non-public inheritance -- There is an attempt to access a private, protected or public member (the text of the message indicates which kind as well as which member) of a class through a class derived from the original. There is an access violation (see 1060 for the more common access violation) critically dependent on the fact that the inheritance relationship is non-public. [11 section 11.2]
64 Type mismatch (Context) (TypeDiff) -- There was a mismatch in types across an assignment (or implied assignment, see Context). TypeDiff specifies the type difference. See options -epn, -eps, -epu, -epp (Section 5.2 Error Inhibition Options) to suppress this message when assigning some kinds of pointers.
Hi Okko, On Aug 12, 2005, at 3:58 AM, Okko Willeboordse wrote:
When I lint my code, using boost 1-32, using PC-Lint I get some issues on the Boost code. I use 'PC-lint for C/C++ (NT) Vers. 8.00r, Copyright Gimpel Software 1985-2005' so the new patch that should deal with Boost better.
These are the issues; BOOST_STATIC_CONSTANT(bool, value = helper::value); C:\Boost\include\boost-1_32\boost\type_traits\is_enum.hpp(143): error 1061: (Error -- public member 'boost::mpl::bool_<<1>>::value' is not accessible through non-public inheritance) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false)
I haven't yet bothered to examine the preprocessor output to see what's going on, but if none of the compilers complained about this, then odds are very, very good that this is caused by a bug in Lint.
C:\Boost\include\boost-1_32\boost\mpl\aux_\has_apply.hpp(22): error 64: (Error -- Type mismatch (arg. no. 1) (volatile const boost::mpl::aux::has_apply_wrapper_<T> * = boost::mpl::aux::has_apply_wrapper_<T> *)) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) C:\Boost\include\boost-1_32\boost\mpl\aux_\has_tag.hpp(20): error 64: (Error -- Type mismatch (arg. no. 1) (volatile const boost::mpl::aux::has_tag_wrapper_<T> * = boost::mpl::aux::has_tag_wrapper_<T> *))
This just looks wrong on the face of it: going from less to more cv- qualification should not elicit a type mismatch error. Again, certain compilers have been shown to be more trustworthy with template metaprograms; if none of them complained, then Lint almost certainly shouldn't. Just remember that version 8.00r is the cope-with-Boost-so-we-don't- have-a-catastrophic-failure release, not the parse-absolutely- everything-in-Boost-correctly release.** Hopefully the latter will not be too far off in the future, but we'll need to balance such efforts against the rest of our development workload. In the meantime, our hope and expectation is that the pain felt by Boost/ Lint users can be largely mitigated through judicious uses of selective message suppression options. Contact us directly if you need help with that. [** However, 8.00r is a lot better than 8.00q in terms of parsing various Boost constructs according to the Standard.] HTH, James Widman -- Gimpel Software http://gimpel.com
participants (2)
-
James Widman
-
Okko Willeboordse