[Bug libstdc++/91486] future::wait_for and shared_timed_mutex::wait_for do not work properly with float duration

2019-08-23 Thread john.salmon at deshaw dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91486 --- Comment #5 from John Salmon --- C++17 already has the needed helper function: ceil(duration). So just change all instances of: __clock_t::now() + __reltime to using __dur = typename __clock_t::duration; __clock_t::now() +

[Bug libstdc++/91486] future::wait_for and shared_timed_mutex::wait_for do not work properly with float duration

2019-08-19 Thread john.salmon at deshaw dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91486 --- Comment #3 from John Salmon --- I grep'ed the latest devel source tree (git sha: afadff66) for occurrences of now\(\). The same bug appears several times in include/experimental/io_context and include/experimental/timer. The underlying

[Bug libstdc++/91486] future::wait_for and shared_timed_mutex::wait_for do not work properly with float duration

2019-08-18 Thread john.salmon at deshaw dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91486 --- Comment #2 from John Salmon --- The same incorrect logic that was fixed in bug 68519 is present in the implementations of future::wait_for and shared_timed_mutex::wait_for. The fix should be the same: explicitly duration_cast the __rtime

[Bug libstdc++/91486] future::wait_for and shared_timed_mutex::wait_for do not work properly with float duration

2019-08-18 Thread john.salmon at deshaw dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91486 --- Comment #1 from John Salmon --- Created attachment 46727 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46727=edit demonstration code

[Bug libstdc++/91486] New: future::wait_for and shared_timed_mutex::wait_for do not work properly with float duration

2019-08-18 Thread john.salmon at deshaw dot com
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: john.salmon at deshaw dot com Target Milestone: ---

[Bug libstdc++/85098] New: undefined reference to std::regex::extended

2018-03-27 Thread john.salmon at deshaw dot com
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: john.salmon at deshaw dot com Target Milestone: --- When I compile with -std=c++11 or -std=c++14 and with -O0, I get this undefined reference. With -std=c++17, there's no problem. With -O1 and higher, there's

[Bug libstdc++/80137] [6/7 Regression] std::generate_canonical calls its generator a non-constant number of times

2017-03-27 Thread john.salmon at deshaw dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80137 --- Comment #3 from John Salmon --- It's easy to overthink this. 0.0 is perfectly acceptable, as is any other _RealType in the range [0, 1.). But since rounding was, presumably, to-nearest or up, it's slightly disconcerting that 0.0 is neither

[Bug libstdc++/80137] std::generate_canonical calls its generator a non-constant number of times

2017-03-23 Thread john.salmon at deshaw dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80137 --- Comment #1 from John Salmon --- The misbehavior is observable by comparing an rng that is invoked directly with one that is invoked via generate_canonical. drdws0134$ cat skippy.cpp #include #include int main() { std::mt19937 rng;

[Bug libstdc++/80137] New: std::generate_canonical calls its generator a non-constant number of times

2017-03-21 Thread john.salmon at deshaw dot com
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: john.salmon at deshaw dot com Target Milestone: --- The fix to bug 63176 causes std::generate_canonical to loop until the result is less than 1.0. As noted

[Bug libstdc++/65714] New: shared_ptrvoid::reset(p) blows a static_assertion

2015-04-09 Thread john.salmon at deshaw dot com
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: john.salmon at deshaw dot com The single-argument form of shared_ptr::reset fails with a static assertion when the pointer type is void. drdws0047$ cat spv.cpp #include memory #include cstdlib void foo(){ std

[Bug libstdc++/61374] New: string_view::operator string() is buggy

2014-05-30 Thread john.salmon at deshaw dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: john.salmon at deshaw dot com The problem is the string(length, c) constructor on line 255 of string_view. The begin/end constructor is what's needed. Here's a quick demonstration. drdlogin0039$ cat bug.cpp #include

[Bug libstdc++/40856] numeric_limits not specialized for __int128_t or __uint128_t

2012-10-25 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856 John Salmon john.salmon at deshaw dot com changed: What|Removed |Added Status|RESOLVED

[Bug c/50444] unaligned movdqa instruction after inlining

2011-09-25 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50444 --- Comment #1 from John Salmon john.salmon at deshaw dot com 2011-09-25 15:22:07 UTC --- Here's a slightly smaller test case. The problem is the 'movdqa'. According the x86-64 ABI, rsp+8 is 16-bit aligned at the entry to main, and therefore so

[Bug libstdc++/50509] New: incorrect code in std::seed_seq::generate

2011-09-24 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50509 Bug #: 50509 Summary: incorrect code in std::seed_seq::generate Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate

2011-09-24 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50510 Bug #: 50510 Summary: transposed variable names in std::seed_seq::generate Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal

[Bug c/50444] New: unaligned movdqa instruction after inlining

2011-09-17 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50444 Bug #: 50444 Summary: unaligned movdqa instruction after inlining Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug c++/48870] New: operator== overload of vector types

2011-05-04 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48870 Summary: operator== overload of vector types Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo:

[Bug c++/48839] New: #error should terminate compilation - similar to missing #include

2011-05-01 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48839 Summary: #error should terminate compilation - similar to missing #include Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3

[Bug c++/48726] New: ICE with initializer_list of unique_ptr in gcc-4.6.0

2011-04-22 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48726 Summary: ICE with initializer_list of unique_ptr in gcc-4.6.0 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/48728] New: cannot construct a vector of unique_ptr from an initializer list

2011-04-22 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48728 Summary: cannot construct a vector of unique_ptr from an initializer list Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug libstdc++/48125] New: max() and min() member functions of random number engines should be static

2011-03-14 Thread john.salmon at deshaw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48125 Summary: max() and min() member functions of random number engines should be static Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3