Issue 71206
Summary Clang should warn when building with `-fexperimental-bounds-safety` and `-x assembler-with-cpp`
Labels clang:diagnostics
Assignees delcypher
Reporter delcypher
    In #70480 the `-fexperimental-bounds-safety` flag was added.

Currently Clang will emit a warning that `-fexperimental-bounds-safety` is ignored when building with `-x assembler`. However, it won't emit a warning when building with `-x assembler-with-cpp`.

This issue tracks adding a warning to detect when `-fexperimental-bounds-safety` is used with `-x assembler-with-cpp`.

We can either have a generic warning whenever this combination of flags are used. Or we could have a more targeted warning:

E.g.

```
#if __has_feature(bounds_safety) // Should warn here
mov x0, #42
#else
#error "oh no"
#endif
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to