1 /* Test for format extensions. Test that the __builtin functions get their
2 default attributes even with -ffreestanding.
4 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
5 /* { dg-do compile } */
6 /* { dg-options "-std=gnu99 -Wformat -ffreestanding" } */
13 __builtin_fprintf (stdout
, "%d", i
);
14 __builtin_fprintf (stdout
, "%ld", i
); /* { dg-warning "format" "__builtin_fprintf" } */
15 __builtin_printf ("%d", i
);
16 __builtin_printf ("%ld", i
); /* { dg-warning "format" "__builtin_printf" } */
18 __builtin_fprintf_unlocked (stdout
, "%d", i
);
19 __builtin_fprintf_unlocked (stdout
, "%ld", i
); /* { dg-warning "format" "__builtin_fprintf_unlocked" } */
20 __builtin_printf_unlocked ("%d", i
);
21 __builtin_printf_unlocked ("%ld", i
); /* { dg-warning "format" "__builtin_printf_unlocked" } */