Opened 10 years ago

Closed 10 years ago

#7643 closed Bugs (wontfix)

Several [-Wnarrowing] warnings reported with gcc 4.7.2 with C++11 enabled

Reported by: steven.lemay@… Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.52.0 Severity: Problem
Keywords: -Wnarrowing Cc:

Description

Compiling boost 1.52 with gcc 4.7.2 with -std=c++11 -std=gnu++11 reports several repeating narrowing warnings. One version of each is shown:

Line 27367: ./boost/regex/v4/cpp_regex_traits.hpp:1069:34: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } [-Wnarrowing]

Line 27372: libs\regex\build\..\src\regex.cpp:195:64: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } [-Wnarrowing] Line 27403: ./boost/regex/pending/object_cache.hpp:64:37: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } [-Wnarrowing] Line 27429: ./boost/regex/v4/regex_traits_defaults.hpp:329:73: warning: narrowing conversion of \37777777605 from 'char' to 'const wchar_t' inside { } [-Wnarrowing] Line 27430: ./boost/regex/v4/regex_traits_defaults.hpp:331:64: warning: narrowing conversion of \37777777605 from 'char' to 'const wchar_t' inside { } [-Wnarrowing] Line 27751: libs\thread\src\pthread\once.cpp:18:60: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } [-Wnarrowing] Line 27752: libs\thread\src\pthread\once.cpp:24:47: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } [-Wnarrowing]

Change History (1)

comment:1 by John Maddock, 10 years ago

Resolution: wontfix
Status: newclosed

Duplicates #7263.

As mentioned previously, these are caused by the definition of PTHREAD_MUTUX_INITIALIZER in pthread.h. I'm unable to reproduce on ubuntu x64, so I suspect your Linux distro is the culprit.

Note: See TracTickets for help on using tickets.