https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85818
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu May 17 16:10:26 2018 New Revision: 260328 URL: https://gcc.gnu.org/viewcvs?rev=260328&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: branches/gcc-8-branch/libstdc++-v3/testsuite/experimental/filesystem/path/preferred_separator.cc Modified: branches/gcc-8-branch/libstdc++-v3/ChangeLog branches/gcc-8-branch/libstdc++-v3/src/filesystem/path.cc