libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / sarif-output / werror.c
blobfa9eb9a1ba0650ba5add2d89d70f84f5f85d200f
1 /* { dg-do compile } */
2 /* { dg-options "-Werror=unused-variable -fdiagnostics-format=sarif-file" } */
4 /* Verify our SARIF output for a translation unit with -Werror. */
6 static int ununsed;
8 /* We expect a failing compile due to the Werror, but the use of
9 -fdiagnostics-format=sarif-file means there should be no output to stderr.
10 DejaGnu injects this message; ignore it:
11 { dg-prune-output "exit status is 1" } */
13 /* Verify that some JSON was written to a file with the expected name:
14 { dg-final { verify-sarif-file } } */
16 /* Use a Python script to verify various properties about the generated
17 .sarif file:
18 { dg-final { run-sarif-pytest werror.c "test-werror.py" } } */