This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/59680] New: Compile error in thread.cc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59680

            Bug ID: 59680
           Summary: Compile error in thread.cc
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rbmj at verizon dot net

Line 186 of thread.cc:
    ::sleep(__s.count() + (__ns >= 1000000));

There are two issues with this:

1) Semantically, it doesn't make sense that there would only be 6 zeros after
anything dealing with nano, since nano is *10^-9.
2) This is a compilation error.  ns is std::chrono::duration, and gcc can't
find a >= for integral constants.  I believe this is should be a /, but it
could conceivably intend for the boolean result to be implicitly converted into
a 1 (this seems strange though)

This is present in both 4.8.2 and trunk


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