Bug 205866 - boost::spirit generates warnings
boost::spirit generates warnings
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: boost (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Benjamin Kosnik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-08 23:36 EDT by Darren Cook
Modified: 2013-08-09 01:48 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.33.1-9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-20 12:40:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Darren Cook 2006-09-08 23:36:22 EDT
Description of problem:

When compiling with -Wshadow I get complaints. The error messages, and the code
fixes are shown below.

Additional info:

/usr/include/boost/spirit/core/non_terminal/impl/rule.ipp:227: warning:
declaration of 'p' shadows a member of 'this'

BEFORE:
            concrete_parser(ParserT const& p) : p(p) {}

AFTER:
            concrete_parser(ParserT const& p_) : p(p_) {}



/usr/include/boost/spirit/core/impl/match.ipp:24: warning: declaration of
'length' shadows a member of 'this'

BEFORE:
    template <typename T>
    inline match<T>::match(std::size_t length, ctor_param_t val_)
    : len(length), val(val_) {}

AFTER:
    template <typename T>
    inline match<T>::match(std::size_t length_, ctor_param_t val_)
    : len(length_), val(val_) {}



/usr/include/boost/spirit/core/scanner/scanner.hpp:243: warning: declaration of
'iteration_policy_t' shadows a member of 'this'

From line 240, BEFORE:
        bool
        at_end() const
        {
            typedef typename PoliciesT::iteration_policy_t iteration_policy_t;
            return iteration_policy_t::at_end(*this);
        }

        value_t
        operator*() const
        {
            typedef typename PoliciesT::iteration_policy_t iteration_policy_t;
            return iteration_policy_t::filter(iteration_policy_t::get(*this));
        }

        scanner const&
        operator++() const
        {
            typedef typename PoliciesT::iteration_policy_t iteration_policy_t;
            iteration_policy_t::advance(*this);
            return *this;
        }


AFTER:
        bool
        at_end() const
        {
            return PoliciesT::iteration_policy_t::at_end(*this);
        }

        value_t
        operator*() const
        {
            return
PoliciesT::iteration_policy_t::filter(PoliciesT::iteration_policy_t::get(*this));
        }

        scanner const&
        operator++() const
        {
            PoliciesT::iteration_policy_t::advance(*this);
            return *this;
        }
Comment 1 Benjamin Kosnik 2006-11-13 06:06:54 EST
Fix pending. It would be great to get a simple test case that I could use to
verify patch.

Also, note that this is still not fixed upstream. I'll ping the boost list for
you about this, with your patch.

-benjamin
Comment 2 Benjamin Kosnik 2006-11-20 12:40:22 EST
Modulo scanner.hpp patch.

Note You need to log in before you can comment on or make changes to this bug.