Boost C++ Libraries: Ticket #4014: [PATCH] boost/gil gcc warning cleanup https://svn.boost.org/trac10/ticket/4014 <p> Patch to clean up excessive gcc 4.x warning barf. </p> <p> To reproduce, compile any gil-using program with: -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Werror=return-type -Wextra -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wno-multichar -Wpacked -Wredundant-decls -Wshadow -Wswitch-default -Wundef -Wwrite-strings -Wctor-dtor-privacy -Werror=non-virtual-dtor -Woverloaded-virtual </p> <p> Attached patch fixes the issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4014 Trac 1.4.3 Tatu Kilappa <tatu.kilappa@…> Mon, 15 Mar 2010 20:53:18 GMT attachment set https://svn.boost.org/trac10/ticket/4014 https://svn.boost.org/trac10/ticket/4014 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_gil_gcc_warning_cleanup.diff</span> </li> </ul> Ticket Mateusz Loskot Thu, 16 Feb 2017 10:54:04 GMT cc set https://svn.boost.org/trac10/ticket/4014#comment:1 https://svn.boost.org/trac10/ticket/4014#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">mateusz@…</span> added </li> </ul> Ticket Stefan Seefeld Sat, 01 Jul 2017 21:12:46 GMT owner changed https://svn.boost.org/trac10/ticket/4014#comment:2 https://svn.boost.org/trac10/ticket/4014#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Hailin Jin</span> to <span class="trac-author">Stefan Seefeld</span> </li> </ul> Ticket Mateusz Loskot Mon, 25 Jun 2018 13:23:24 GMT cc changed https://svn.boost.org/trac10/ticket/4014#comment:3 https://svn.boost.org/trac10/ticket/4014#comment:3 <ul> <li><strong>cc</strong> <span class="trac-author">Mateusz Loskot</span> added </li> </ul> Ticket Mateusz Loskot Sat, 25 Aug 2018 07:54:06 GMT attachment set https://svn.boost.org/trac10/ticket/4014 https://svn.boost.org/trac10/ticket/4014 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">build.7z</span> </li> </ul> <p> Complete build log generated by b2 toolset=gcc using GCC 7.3 and all the compilation flags suggested by the ticket's reporter </p> Ticket Mateusz Loskot Sat, 25 Aug 2018 07:57:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4014#comment:4 https://svn.boost.org/trac10/ticket/4014#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Most of the warnings cleaned by the patch are -Wshadow diagnostics for constructor parameter/class member of the same name. Use of the same constructor parameter/class member names is fine C++ and I don't think we need any changes here. </p> <p> I attached complete build log generated by <code>b2 toolset=gcc</code> using GCC 7.3 and all the compilation flags suggested by the ticket's reporter and I no longer see any </p> <p> <code>warning: declaration of ... shadows a member of...</code> </p> <p> related to the suggested patch. </p> <p> As for the <code>io_error</code> function, it also seems no longer necessary. BTW, GIL in Boost 1.68 delivers completely re-implemented I/O extensions. The new version does provide custom error_exit which does not call hard exit() to abort the application, so the issue should be gone now. </p> <p> Closing as fixed. </p> <p> github ref: <a class="ext-link" href="https://github.com/boostorg/gil/projects/4#card-12435867"><span class="icon">​</span>https://github.com/boostorg/gil/projects/4#card-12435867</a> </p> Ticket