https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85818

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu May 17 15:36:25 2018
New Revision: 260326

URL: https://gcc.gnu.org/viewcvs?rev=260326&root=gcc&view=rev
Log:
PR libstdc++/85818 ensure path::preferred_separator is defined

Because path.cc is compiled with -std=gnu++17 the static constexpr
data member is implicitly 'inline' and so no definition gets emitted
unless it gets used in that translation unit. Other translation units
built as C++11 or C++14 still require a namespace-scope definition of
the variable, so mark the definition as used.

        PR libstdc++/85818
        * src/filesystem/path.cc (path::preferred_separator): Add used
        attribute.
        * testsuite/experimental/filesystem/path/preferred_separator.cc: New.

Added:
   
trunk/libstdc++-v3/testsuite/experimental/filesystem/path/preferred_separator.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/src/filesystem/path.cc

Reply via email to