[clang] [clang][CUDA] Disable float128 diagnostics for device compilation (PR #83918)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 4 15:38:04 PST 2024
================
@@ -4877,7 +4877,9 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI,
NewElemTy = Context.getRealTypeForBitwidth(DestWidth, ExplicitType);
if (NewElemTy.isNull()) {
- Diag(AttrLoc, diag::err_machine_mode) << 1 /*Unsupported*/ << Name;
+ // Only emit diagnostic on host for 128-bit mode attribute
----------------
Artem-B wrote:
> This is going to error out like this:
>
> ```
> error: 'a' requires 128 bit size '__float128' type support, but target 'nvptx64-nvidia-cuda' does not support it
> ```
Something does not add up. How would we get `target 'nvptx64-nvidia-cuda'` if the diag below only fires if we're compiling for the host?
https://github.com/llvm/llvm-project/pull/83918
More information about the cfe-commits
mailing list