Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / plugin / location-overflow-test-2.c
blobeb37519a0db8e4be6113911968b286ccbda9f071
1 /* { dg-options "-fdiagnostics-show-caret -Wmisleading-indentation -Wall -fplugin-arg-location_overflow_plugin-value=0x50000001" } */
3 /* We use location_overflow_plugin.c, which injects the case that location_t
4 values have exceeded LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES, and hence
5 no range-packing should occur. */
7 /* Verify that we still have column numbers. */
8 extern unknown_type test; /* { dg-error "8: unknown type name" } */
10 /* ...and ranges. */
11 /* { dg-begin-multiline-output "" }
12 extern unknown_type test;
13 ^~~~~~~~~~~~
14 { dg-end-multiline-output "" } */
17 /* PR c++/68819: verify that -Wmisleading-indentation is still available. */
19 int
20 fn_1 (int flag)
22 int foo = 4, bar = 5;
23 if (flag) foo = 3; bar = 2; /* { dg-warning "this .if." } */
24 return foo * bar;
27 /* Verify that we still have ranges, despite the lack of packing. */
29 /* { dg-begin-multiline-output "" }
30 if (flag) foo = 3; bar = 2;
31 ^~~
32 { dg-end-multiline-output "" } */
33 /* { dg-begin-multiline-output "" }
34 if (flag) foo = 3; bar = 2;
36 { dg-end-multiline-output "" } */