Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 607620

Summary: <sys-devel/gcc-6.0: c++11 mode does not work properly on FreeBSD
Product: Gentoo/Alt Reporter: Yuta SATOH <nigoro.dev>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED OBSOLETE    
Severity: normal CC: mgorny, toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
Whiteboard:
Package list:
Runtime testing required: ---

Description Yuta SATOH 2017-01-29 11:41:46 UTC
-std=c++11 is required for llvm and clang.

test.cpp
#include <string>

int main() {
        std::to_string(1);
        return 0;
}

# g++-5.4.0 -std=c++11 test.cpp
test.cpp: In function 'int main()':
test.cpp:4:9: error: 'to_string' is not a member of 'std'
         std::to_string(1);
         ^
# g++-6.3.0 -std=c++11 test.cpp
#
Note, Compile is successful with gcc-6.3.0.

FYI,
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193528
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-29 12:17:55 UTC
@toolchain, any idea how to fix it? FWICS, passing -D_GLIBCXX_USE_C99 works around the problem, so maybe there's an easy trick to make it enable that for -std=c++11?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 17:37:16 UTC
*-fbsd is gone.