analyzer: enable taint state machine by default [PR103533]
[official-gcc.git] / gcc / testsuite / c-c++-common / diagnostic-format-sarif-file-valid-CP850.c
bloba189274692e319f7d6d7b5361f879a91721abfb0
1 /* Adapted from gcc.dg/diagnostic-input-charset-1.c */
2 /* { dg-do compile } */
3 /* { dg-require-iconv "CP850" } */
4 /* { dg-options "-finput-charset=CP850 -fdiagnostics-format=sarif-file" } */
5 /* { dg-excess-errors "The error is sent to the SARIF file, rather than stderr" } */
7 /* Test that diagnostics are converted to UTF-8; this file is encoded in
8 CP850.
10 The non-ASCII byte here is 0xf5, which when decoded as CP850
11 is U+00A7 SECTION SIGN */
12 const char *section = "รต"
14 /*
15 { dg-final { verify-sarif-file } }
17 Verify that we captured the expected warning, and converted the snippet to
18 UTF-8 on output.
20 { dg-final { scan-sarif-file {"text": "expected ',' or ';' at end of input"} } }
21 { dg-final { scan-sarif-file {"text": "const char .section = \\"\u00a7\\"} } }