================
@@ -4894,10 +4894,14 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, 
SourceRange ExprRange,
                             diag::err_incomplete_type)) {
       return ExprError();
     }
-  } else if (IsN && !ValType->isIntegerType() && !ValType->isPointerType()) {
+  } else if (IsN && !ValType->isIntegerType() && !ValType->isPointerType() &&
+             !(ValType->isFloatingType() &&
----------------
jhuber6 wrote:

Looking at it closer, there's already some handling for allowing floating point 
and pointer values in some cases. I do not know why the `_n` variants and some 
of these were excluded, the comment lists that it must be a fundamental 1-16 
byte type but that's true for all fp / ptr types. I'll try to reuse this and 
remove this check, because I think this can be much more general.

My guess for why we didn't support this was possibly compatibility with GNU? 
But we have a lot of extra atomic support anyway.

https://github.com/llvm/llvm-project/pull/183843
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to