This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


commit 3eb1acc290b7b7407a24b62a3d267f344e88ffbd
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 21 13:23:30 2018 +0100

    PR libstdc++/85818 make new test require Filesystem support
    
            PR libstdc++/85818
            * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
            dg-require-filesystem-ts.

diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/preferred_separator.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/preferred_separator.cc
index b470e312bb1..5ca948dfaef 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/preferred_separator.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/preferred_separator.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-O0 -lstdc++fs -std=gnu++11" }
 // { dg-do link { target c++11 } }
+// { dg-require-filesystem-ts "" }
 
 #include <experimental/filesystem>
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]