AaronBallman wrote:

> Maybe MSVC has logic similar to `-Wgnu-folding-constant`? clang also folds 
> the array bounds in your example.

That's what I think might be happening, but I think more comprehensive research 
is needed to figure out what is and isn't supported by cl to help decide how we 
want to proceed,

To me, there's a prerequisite question we should answer first: should 
functionality be gated on `-fms-kernel` in Clang if it doesn't require 
`/kernel` in cl? (Also keep in mind that we have clang-cl which mimics cl 
command line options; we currently have this one under the "unsupported" list 
currently but I imagine we'll want to hook that option up to `-fms-kernel` at 
some point: 
https://github.com/llvm/llvm-project/blob/ce16067aab54ae04f98e6ef5edd1bd7a68d33d90/clang/include/clang/Options/Options.td#L9534)

That said, it's also not clear to me if this is `-fms-compatibility` or 
`-fms-extensions` -- the lack of documentation on MSDN for the extension, plus 
it working without `/kernel` is why I think `-fms-compatibility` is the correct 
approach. But if this is an official extension of some kind, I could see an 
argument for `-fms-extensions` too.

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

Reply via email to