#8725 closed Bugs (fixed)
GCC 4.8 warns of ignored attribute in declaration
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | program_options |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
When compiling with -Wall (GCC 4.8.0) the following warning is raised as an error:
In file included from libs/program_options/src/variables_map.cpp:12:0: ./boost/program_options/variables_map.hpp:30:11: error: attribute ignored in declaration of ‘class boost::program_options::variables_map’ [-Werror=attributes] class variables_map; ^ ./boost/program_options/variables_map.hpp:30:11: note: attribute for ‘class boost::program_options::variables_map’ must follow the ‘class’ keyword
This is caused by friend class declaration below having the attributes in the wrong order. Below is the simple fix.
Index: boost/program_options/variables_map.hpp =================================================================== --- boost/program_options/variables_map.hpp (revision 84899) +++ boost/program_options/variables_map.hpp (working copy) @@ -98,7 +98,7 @@ void store(const basic_parsed_options<char>& options, variables_map& m, bool); - friend BOOST_PROGRAM_OPTIONS_DECL class variables_map; + friend class BOOST_PROGRAM_OPTIONS_DECL variables_map; }; /** Implements string->string mapping with convenient value casting
Attachments (1)
Change History (3)
by , 9 years ago
Attachment: | patch-8725.txt added |
---|
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [84903]) Silence gcc warning. Thanks to Chris Stylianou.
Closes #8725.