Note: For some reasons, GCC -Wall enables the warning for C++
while it doesn't for C.
Details
- Reviewers
Mordante - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Thanks for your patch! One suggestion.
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 | This is consistent with the next line. |
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 | my understanding is that s.count() here is long long. |
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 | Good point, ts_sec, might indeed be a smaller type. (There is no guarantee count is long long, but it most likely is.) I still wonder whether this change fixes anything, in glibc time_t is signed Maybe it's safer to cast the result to the common type of these two types, WDYT? |
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 | you are right this is not necessary for glibc. however, for other platforms, time_t can be uint32_t, uint64_t, etc. |
We want to finish the review queue for libc++ due to moving to GitHub PRs. Do you want to continue this patch or should I finish if for you?
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 | Maybe we should use cmp_less which has solved this issue. We require C++20 for the dylib. |
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 |
maybe. i wasn't aware of the function. thank you.
can you explain a bit? (i'm not a C++ expert.) |
libcxx/src/condition_variable.cpp | ||
---|---|---|
66 | C++20 is the version of C++ we use so the version from 2020. This means we can use cmp_less. |
This is consistent with the next line.