[PATCH] PR libstdc++/85818 ensure path::preferred_separator is defined

Jonathan Wakely jwakely@redhat.com
Mon May 21 12:29:00 GMT 2018


On 17/05/18 16:36 +0100, Jonathan Wakely wrote:
>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.
>
>Tested powerpc64le-linux, committed to trunk. Backport to gcc-8 to
>follow.

I forgot to make the new test depend on the Filesystem lib being
supported. Fixed by this patch, committed to trunk and gcc-8-branch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 899 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180521/2b887fd9/attachment.bin>


More information about the Libstdc++ mailing list