[llvm] Warn on align directive with non-zero fill value in virtual sections (PR #66792)

Luís Marques via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 10:20:19 PDT 2023


================
@@ -12,5 +12,8 @@
 # CHECK: {{.*}}.s:[[#@LINE+1]]:3: error: SHT_NOBITS section '.bss' cannot have instructions
   addb %al,(%rax)
 
+# CHECK: {{.*}}.s:[[#@LINE+1]]:11: warning: ignoring non-zero fill value in SHT_NOBITS section '.bss'
+.align 4, 42
+
----------------
luismarques wrote:

> Add check lines for `--no-warn` / `--fatal-warnings`?

Can you walk me through why we might want that, please? I'd have guessed that if we properly emit a warning and the diagnostic infrastructure is working as intended then we wouldn't need to test such interactions for all kinds of warnings.

https://github.com/llvm/llvm-project/pull/66792


More information about the llvm-commits mailing list