-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress clang error #461
Suppress clang error #461
Conversation
d5666c3
to
920b446
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-master #461 +/- ##
===========================================
Coverage 16.60% 16.60%
===========================================
Files 221 221
Lines 48486 48490 +4
Branches 20271 20272 +1
===========================================
+ Hits 8052 8053 +1
- Misses 36141 36143 +2
- Partials 4293 4294 +1 ☔ View full report in Codecov by Sentry. |
Actually maybe I miss something but what exactly is the issue? |
It seems the issue is the implicit cast upon calling |
Sorry, I don't have a Mac device. This original problem of implicit conversion only happens on Mac. Implicit conversion should not happen. Here is the comment I left in the issue. #449 (comment) |
920b446
to
7eb7cc8
Compare
Yes. That's what I was asking for agnostic implementation. It needs to take
all those deps into consideration. And previous solution is to use macro (
actually idk if there is any other solutions even exist in C/C++) to deal
with this
…On Mon, Sep 2, 2024, 01:23 Ivana ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/backend/linalg_internal_cpu/Det_internal.cpp
<#461 (comment)>:
> @@ -27,8 +31,8 @@ namespace cytnx {
"[ERROR][Det_internal] Error in Lapack function 'zgetrf': Lapack INFO = ", info);
od[0] = 1;
bool neg = 0;
- for (lapack_int i = 0; i < N; i++) {
- od[0] *= (cytnx_complex128)_Rin[i * N + i];
+ for (int i = 0; i < N; i++) {
Updated
—
Reply to this email directly, view it on GitHub
<#461 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCX3SL3XRE73G5D7NTTUVTZUPY4FAVCNFSM6AAAAABNOVPMI6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENZUGY4TKNBRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Suppress specific compilation errors reported by Clang for the following files: 1. **src/linalg/Tensordot.cpp**: - Error: non-pod-varargs - Details: Passing non-POD types to variadic functions is conditionally supported by the compiler, as outlined in the C++17 standard (section 8.2.2/9). For more information, refer to [Passing NON-POD type to Variadic function is undefined behavior?](https://stackoverflow.com/a/10083921). 2. **Other Files**: - Error: c++11-narrowing
I would like to suggest to keep this kind of technical note somewhere in the repository. |
An issue reported the code below raises error by clang on Mac. ``` doulbe _Complex right = 123.4 + 45435.1I; std::complex<doulbe> left{43.4, 2532.1}; left *= (std::complex<doulbe>)right; // invalid implicit conversion ``` This may be a bug in Clang on Mac, as no errors are raised by Clang on CentOS or in the online compiler.
7eb7cc8
to
72453ca
Compare
Mentioned in the comment in the latest update. |
This PR eases the problem of #449.