diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/warn-nsstring.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/warn-nsstring.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/warn-nsstring.c b/gcc/testsuite/gcc.dg/warn-nsstring.c new file mode 100644 index 000000000..3795fb737 --- /dev/null +++ b/gcc/testsuite/gcc.dg/warn-nsstring.c @@ -0,0 +1,7 @@ +/* Check that the NSString format extension is rejected in c. */ +/* { dg-do compile } */ + +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" } */ + + |