Opened 9 years ago

Last modified 7 years ago

#8888 new Bugs

[python] GCC 4.8+ warns about unused local typedef

Reported by: Petr Machata <pmachata@…> Owned by: Ralf W. Grosse-Kunstleve
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

During the build of Boost, GCC warns about several unused typedefs in Boost.Python. There are many of these that seem like they should be converted to BOOST_STATIC_ASSERT, like this one for example.

./boost/python/cast.hpp:73:20: warning: typedef 'must_be_a_complete_type' locally defined but not used [-Wunused-local-typedefs]
       typedef char must_be_a_complete_type[sizeof(T)];

There's at least one other instance of this problem that I know of. Shall I prepare a patch for this, or is this undesirable for some reason?

In the mean time, I'm attaching a patch for another one.

Attachments (4)

boost-1.54.0-python-unused_typedef.patch (688 bytes ) - added by Petr Machata <pmachata@…> 9 years ago.
A fix.
0001-python-Drop-backward-compatible-support-in-to_python.patch (1.0 KB ) - added by Petr Machata <pmachata@…> 9 years ago.
This replaces my original patch--the whole block can be removed, as since recently, Boost assumes GCC >= 3.
0002-python-Convert-a-number-of-assertion-constructs-to-B.patch (10.6 KB ) - added by Petr Machata <pmachata@…> 9 years ago.
This converts a whole bunch of static-assert-alike construct with BOOST_MPL_ASSERT_MSG.
0003-python-Convert-a-static-assert-like-construct-to-BOO.patch (1.1 KB ) - added by Petr Machata <pmachata@…> 9 years ago.
This converts one additional static-assert-like construct with BOOST_STATIC_ASSERT.

Download all attachments as: .zip

Change History (7)

by Petr Machata <pmachata@…>, 9 years ago

A fix.

by Petr Machata <pmachata@…>, 9 years ago

This replaces my original patch--the whole block can be removed, as since recently, Boost assumes GCC >= 3.

by Petr Machata <pmachata@…>, 9 years ago

This converts a whole bunch of static-assert-alike construct with BOOST_MPL_ASSERT_MSG.

by Petr Machata <pmachata@…>, 9 years ago

This converts one additional static-assert-like construct with BOOST_STATIC_ASSERT.

comment:1 by Petr Machata <pmachata@…>, 9 years ago

I verified that there are no regressions in the Python test suite on x86_64 Fedora with these patches applied.

comment:2 by blastrock, 8 years ago

Any news on this? The problem is still present in boost 1.56.

comment:3 by anonymous, 7 years ago

I try to do a pull request for that github.com/boostorg/python/pull/18

Note: See TracTickets for help on using tickets.