summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/warn-nsstring.c
blob: 600ff34d9362ce35d90f7ace54c7277b163c39de (plain)
1
2
3
4
5
6
7
/* Check that the NSString format extension is rejected in c.  */
/* { dg-do compile } */
/* { dg-options "-Wformat" } */
extern void NSLog (void *fmt, ...) __attribute__((format(__NSString__, 1, 2))); /* { dg-warning "is only allowed in Objective-C dialects" } */
extern void NSLog1 (void *fmt, ...) __attribute__((format(NSString, 1, 2))); /* { dg-warning "is only allowed in Objective-C dialects" } */