lots of warning with gcc-4.8.1 + boost-1.54.0

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

lots of warning with gcc-4.8.1 + boost-1.54.0

Neal Becker
Lots of warnings like this:

./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally
defined but not used [-Wunused-local-typedefs]

when building 1.54.0 with gcc-4.8.1 (fedora f19)


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Nathan Ridge
> Lots of warnings like this:
>
> ./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally
> defined but not used [-Wunused-local-typedefs]
>
> when building 1.54.0 with gcc-4.8.1 (fedora f19)

This warning is new in GCC 4.8, and I have been seeing a ton of them
not just in boost, but in every codebase I've built.

IMO gcc should not have this warning turned on by default.

CC'ing the gcc folks.

Regards,
Nate    

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Steve Lorimer-2
In reply to this post by Neal Becker
You can include boost headers using -isystem which will suppress these
warnings

-isystem dir Search dir for header files, after all directories specified
by -I but before the standard system directories. *Mark it as a system
directory, so that it gets the same special treatment as is applied to the
standard system directories*


On 3 July 2013 11:29, Neal Becker <[hidden email]> wrote:

> Lots of warnings like this:
>
> ./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’
> locally
> defined but not used [-Wunused-local-typedefs]
>
> when building 1.54.0 with gcc-4.8.1 (fedora f19)
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Jonathan Wakely-2
In reply to this post by Nathan Ridge
On 3 July 2013 02:41, Nathan Ridge wrote:
>> Lots of warnings like this:
>>
>> ./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally
>> defined but not used [-Wunused-local-typedefs]
>>
>> when building 1.54.0 with gcc-4.8.1 (fedora f19)
>
> This warning is new in GCC 4.8, and I have been seeing a ton of them
> not just in boost, but in every codebase I've built.

It was new in GCC 4.7, http://gcc.gnu.org/gcc-4.7/changes.html

It affects Boost more than most code because of the prevalent use of
concept checks and static assertions which are usually implemented
using typedefs but only conditionally compiled.

I keep being surprised noone's disabled it in gcc.jam yet.

> CC'ing the gcc folks.

That's not very helpful because posting to the Boost list is
subscription only (you'll have two copies of this mail, because the
first one I sent from an address subscribed to the GCC list but not
this one.)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Daniel James-2
On 3 July 2013 09:32, Jonathan Wakely <[hidden email]> wrote:
>
> I keep being surprised noone's disabled it in gcc.jam yet.

That wouldn't work for headers, as they get included when building
with other build systems. Since this is new, I guess we can use
pragmas to disable the warning, but that's a pain.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Nathan Ridge
In reply to this post by Jonathan Wakely-2
> On 3 July 2013 02:41, Nathan Ridge wrote:
>>> Lots of warnings like this:
>>>
>>> ./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally
>>> defined but not used [-Wunused-local-typedefs]
>>>
>>> when building 1.54.0 with gcc-4.8.1 (fedora f19)
>>
>> This warning is new in GCC 4.8, and I have been seeing a ton of them
>> not just in boost, but in every codebase I've built.
>
> It was new in GCC 4.7, http://gcc.gnu.org/gcc-4.7/changes.html

I stand corrected. (What's new in 4.8 is it being included in -Wall,
which is why I never noticed it in 4.7).

> It affects Boost more than most code because of the prevalent use of
> concept checks and static assertions which are usually implemented
> using typedefs but only conditionally compiled.

I've seen spews of that warning for other large projects, such as
clang or wxWidgets, not just boost.

Would GCC consider removing it from -Wall?

>> CC'ing the gcc folks.
>
> That's not very helpful because posting to the Boost list is
> subscription only (you'll have two copies of this mail, because the
> first one I sent from an address subscribed to the GCC list but not
> this one.)

My apologies.

Regards,
Nate    

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Mathias Gaunard-2
In reply to this post by Jonathan Wakely-2
On 03/07/13 10:32, Jonathan Wakely wrote:

> On 3 July 2013 02:41, Nathan Ridge wrote:
>>> Lots of warnings like this:
>>>
>>> ./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally
>>> defined but not used [-Wunused-local-typedefs]
>>>
>>> when building 1.54.0 with gcc-4.8.1 (fedora f19)
>>
>> This warning is new in GCC 4.8, and I have been seeing a ton of them
>> not just in boost, but in every codebase I've built.
>
> It was new in GCC 4.7, http://gcc.gnu.org/gcc-4.7/changes.html
>
> It affects Boost more than most code because of the prevalent use of
> concept checks and static assertions which are usually implemented
> using typedefs but only conditionally compiled.

Unused local typedefs is a real bug.
It's Boost that needs fixing IMHO.

If it's for a static assert trick, just write your trick differently to
not require it or just use one of the provided macros that do it right.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Petr Machata
In reply to this post by Nathan Ridge
Nathan Ridge <[hidden email]> writes:

>> On 3 July 2013 02:41, Nathan Ridge wrote:
>>>> ./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally
>>>> defined but not used [-Wunused-local-typedefs]
>>
>> It was new in GCC 4.7, http://gcc.gnu.org/gcc-4.7/changes.html
>
> I've seen spews of that warning for other large projects, such as
> clang or wxWidgets, not just boost.
>
> Would GCC consider removing it from -Wall?

GCC doesn't emit this warning if such typedefs are annotated with
__attribute__((__unused__)).  We just need to fix all instances of this
problem.  So far I identified these there:

- https://svn.boost.org/trac/boost/ticket/8844 (Boost.Bind)
- https://svn.boost.org/trac/boost/ticket/8847 (Boost.ConceptCheck)
- https://svn.boost.org/trac/boost/ticket/8859 (Boost.Serialization)

Thanks,
PM

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Chris Stylianou
The Boost.ConceptCheck has already been fixed in the trunk.

I've raised tickets for the following additional warnings:
- https://svn.boost.org/trac/boost/ticket/8853 [tuple]
- https://svn.boost.org/trac/boost/ticket/8854 [random]
- https://svn.boost.org/trac/boost/ticket/8855 [math]
- https://svn.boost.org/trac/boost/ticket/8856 [date_time]
Reply | Threaded
Open this post in threaded view
|

Re: lots of warning with gcc-4.8.1 + boost-1.54.0

Chris Stylianou
It would be great to have them fixed before the 1.55 release (So far only #8855 has been).

Also add #8726 to the list.