2 /* Make sure anticipated builtins are not considered before they are declared. */
3 /* { dg-do compile } */
4 /* { dg-options "-fdiagnostics-show-caret" } */
6 int sscafn (const char *, const char *, ...);
12 return ssacnf (p, "%d", &i); /* { dg-error "10: .ssacnf. was not declared in this scope" } */
13 /* { dg-begin-multiline-output "" }
14 return ssacnf (p, "%d", &i);
16 { dg-end-multiline-output "" } */
17 // { dg-message "10: suggested alternative: 'sscafn'" "" { target *-*-* } 12 }
18 /* { dg-begin-multiline-output "" }
19 return ssacnf (p, "%d", &i);
22 { dg-end-multiline-output "" } */
25 int scafn (const char *, ...);
26 int scanf (const char *, ...);
32 return sacnf ("%d", &i); /* { dg-error "10: .sacnf. was not declared in this scope" } */
33 /* { dg-begin-multiline-output "" }
34 return sacnf ("%d", &i);
36 { dg-end-multiline-output "" } */
37 // { dg-message "10: suggested alternative: 'scanf'" "" { target *-*-* } 32 }
38 /* { dg-begin-multiline-output "" }
39 return sacnf ("%d", &i);
42 { dg-end-multiline-output "" } */