PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / fmax-errors.c
blob947d60048a179af148426320883c3377bb3f7bce
1 /* PR c/44782 */
2 /* { dg-do compile } */
3 /* { dg-options "-fmax-errors=3 -Wall" } */
5 void foo (unsigned int i, unsigned int j)
7 (i) (); /* { dg-error "" } */
8 (j) (); /* { dg-error "" } */
10 i + j; /* { dg-warning "" } */
12 (k) (); /* { dg-error "" } */
13 /* Make sure we see the notes related to the final error we emit. */
14 /* { dg-message "identifier" "" { target c } .-2 } */
16 /* Warnings after the final error should not appear. */
17 i + j; /* no warning. */
19 (i*j) (); /* no error here due to -fmax-errors */
21 } /* { dg-prune-output "compilation terminated" } */