Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / format / attr-1.c
blob8b2f5b7a3574cf392f3ea0e7b4b9bf49fb03fc06
1 /* Test for strftime format attributes: can't have first_arg_num != 0. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu99 -Wformat" } */
6 #define DONT_GNU_PROTOTYPE
7 #include "format.h"
9 extern void foo0 (const char *) __attribute__((__format__(gnu_attr___strftime__, 1, 0)));
10 extern void foo1 (const char *, ...) __attribute__((__format__(gnu_attr___strftime__, 1, 2))); /* { dg-error "cannot format" "strftime first_arg_num != 0" } */