diff mbox

[v3] LWG 2510, make the default constructors of library tag types explicit.

Message ID 20151112161304.GE2937@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely Nov. 12, 2015, 4:13 p.m. UTC
On 12/11/15 14:36 +0000, Jonathan Wakely wrote:
>On 12/11/15 15:23 +0100, Gerald Pfeifer wrote:
>>On Wed, 11 Nov 2015, Jonathan Wakely wrote:
>>>Fixed by this patch.
>>
>>Thanks, Jonathan!  Unfortunately bootstrap is still broken
>>(on i386-unknown-freebsd11.0 at least):
>
>Different issue.
>
>>In file included from 
>>/scratch/tmp/gerald/gcc-HEAD/libstdc++-v3/src/c++11/thread.cc:27:0:
>>/scratch/tmp/gerald/OBJ-1112-1414/i386-unknown-freebsd10.2/libstdc++-v3/include/
>>thread: In function ‘void std::this_thread::sleep_for(const std::chrono::duration<_Rep1, _Period1>&)’:
>>/scratch/tmp/gerald/OBJ-1112-1414/i386-unknown-freebsd10.2/libstdc++-v3/include/
>>thread:300:44: error: ‘errno’ was not declared in this scope
>>while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
>>                                          ^
>>/scratch/tmp/gerald/OBJ-1112-1414/i386-unknown-freebsd10.2/libstdc++-v3/include/
>>thread:300:53: error: ‘EINTR’ was not declared in this scope
>>while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
>
>Does adding #include <errno.h> to libstdc++-v3/include/std/thread
>solve it?

Committed to trunk.

Comments

Gerald Pfeifer Nov. 12, 2015, 4:19 p.m. UTC | #1
On Thu, 12 Nov 2015, Ville Voutilainen wrote:
> Note that that's a separate problem that has nothing to do with the
> tag-type-explicit-default-ctor patch.

On Thu, 12 Nov 2015, Jonathan Wakely wrote:
> Different issue.

Sorry, I had two different libstdc++ bootstrap failures in the
last 24 hours, and misassociated this one.

> Does adding #include <errno.h> to libstdc++-v3/include/std/thread
> solve it?

Yep, that worked.

On Thu, 12 Nov 2015, Jonathan Wakely wrote:
> Committed to trunk.

Thanks!

Gerald
diff mbox

Patch

commit ede84363f2a4374b0d16ffda19fbcffdc44221c3
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Nov 12 15:21:24 2015 +0000

    	* include/std/thread: Include <cerrno> for EINTR.

diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index 5940e6e..8c01feb 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -38,6 +38,7 @@ 
 #include <chrono>
 #include <functional>
 #include <memory>
+#include <cerrno>
 #include <bits/functexcept.h>
 #include <bits/functional_hash.h>
 #include <bits/gthr.h>