-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[MLIR] mlir/include/mlir/IR/BuiltinAttributes.h(354,14): warning: 'complex' is deprecated: warning STL4037: #65255
Comments
@llvm/issue-subscribers-mlir-core |
We've been using |
I wonder if in the mean time it might be worth to silence the warning with |
Not opposed, but I'm just concerned this will hide the issue and we won't fix it. |
It's a C++ standard definition that |
The standard prohibits custom floating types:
SO link from 2017: https://stackoverflow.com/questions/11108743/why-does-c-mandate-that-complex-only-be-instantiated-for-float-double-or-lon Perhaps someone from the committee could comment? |
Digging a bit more into this, it is https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1467r9.html that changed the wording for 28.4.1/2/. From what I understand, that allows for "implementations", that is the compiler and the std library to provide floating-point types, but not user code, like here. @iburyl since you're one of the authors, would have time to comment please? I feel the MS-STL warning is a bit restrictive right now, in the absence of a proper implementation for P1467, [1] and [2]. But in the end there seems to be now way to provide user floating-point types, like [1] https://discourse.llvm.org/t/rfc-c-23-p1467r9-extended-floating-point-types-and-standard-names/70033/32 |
p1467r9 didn't change the wording in any meaningful way. I don't have an opinion on whether it is better to silence the warning, or to change the code to not use |
Agree with @dkolsen-pgi. From the standard perspective From my perspective Warning is here in the right place and says the right thing - there is not way to guarantee correctness of implementation of such functions as generic header-based complex acos for arbitaray user defined floating-point type (and even less so for integer types). If there is a believe that APFloat is actually working in those functions, and there is a strong need to keep it working even if it is non-conforming, it is better be enabled individually, rather than removing this Warning for all types. |
Do we know how wide the usage of the these std::complex-on-AP*-types is/how hard it'd be to remove the offending uses? A few hundred warnings (one for each file including BuiltinAttributes.h) isn't super fun in a clean LLVM build with default compiler settings. We've added the |
Host & Target: x86_64-pc-windows-msvc
LLVM Version: 16.0.6
The text was updated successfully, but these errors were encountered: