1 /* PR c/44782 */
2 /* { dg-do compile } */
3 /* { dg-options "-fmax-errors=3 -Wall" } */
4 
foo(unsigned int i,unsigned int j)5 void foo (unsigned int i, unsigned int j)
6 {
7   (i) ();			/* { dg-error "" } */
8   (j) ();			/* { dg-error "" } */
9 
10   i + j; /* { dg-warning "" }  */
11 
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 } */
15 
16   /* Warnings after the final error should not appear.  */
17   i + j; /* no warning.  */
18 
19   (i*j) ();			/* no error here due to -fmax-errors */
20 
21 } /* { dg-prune-output "compilation terminated" } */
22