Modify

Ticket #3718 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

boost regex library generates shadowed variable/member warnings

Reported by: nathan.brewton@… Owned by: johnmaddock
Milestone: Boost 1.42.0 Component: regex
Version: Boost 1.40.0 Severity: Problem
Keywords: warnings Cc:

Description

Including boost/regex.h with warnings for shadowed variables and warnings enabled generates warnings. The output below is generated by gcc with -Wshadow:

In file included from mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/regex.hpp:73,

from mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex.hpp:31, from evaluate/LEvaluator.cpp:15:

mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp: In member function 'bool boost::re_detail::basic_regex_parser<charT, traits>::parse_repeat(size_t, size_t)': mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:971: warning: declaration of 'jmp' shadows a previous local mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:956: warning: shadowed declaration is here mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp: In member function 'bool boost::re_detail::basic_regex_parser<charT, traits>::parse_perl_extension()': mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:1961: warning: declaration of 'v' shadows a previous local mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:1834: warning: shadowed declaration is here In file included from mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/regex.hpp:82,

from mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex.hpp:31, from evaluate/LEvaluator.cpp:15:

mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits<BidiIterator?>::difference_type boost::match_results<BidiIterator?, Allocator>::length(const typename boost::re_detail::regex_iterator_traits<BidiIterator?>::value_type*) const': mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:108: warning: declaration of 'end' shadows a member of 'this' mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits<BidiIterator?>::difference_type boost::match_results<BidiIterator?, Allocator>::length(const charT*) const': mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:115: warning: declaration of 'end' shadows a member of 'this' mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits<BidiIterator?>::difference_type boost::match_results<BidiIterator?, Allocator>::position(const typename boost::re_detail::regex_iterator_traits<BidiIterator?>::value_type*) const': mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:139: warning: declaration of 'end' shadows a member of 'this' mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits<BidiIterator?>::difference_type boost::match_results<BidiIterator?, Allocator>::position(const charT*) const': mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:146: warning: declaration of 'end' shadows a member of 'this'

Attachments

Change History

comment:1 Changed 4 years ago by marshall

  • Owner set to johnmaddock

comment:2 Changed 4 years ago by johnmaddock

  • Component changed from None to regex

comment:3 Changed 4 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

(In [58154]) Fix -Wshadow gcc warnings. Update and regenerate docs. Fixes #3718.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.