aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2019-01-14 18:44:00 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2019-01-14 11:44:00 -0700
commit23db6ced33c245c38c147c31011bbafa392e4328 (patch)
treee0ee52741bfafa1d02673e8cf26b8d54139efe82 /gcc/testsuite/objc.dg
parent15f4e33db7e7b0c466db39eccfc693c910459368 (diff)
downloadgcc-23db6ced33c245c38c147c31011bbafa392e4328.zip
gcc-23db6ced33c245c38c147c31011bbafa392e4328.tar.gz
gcc-23db6ced33c245c38c147c31011bbafa392e4328.tar.bz2
PR target/88638 - FAIL: fsf-nsstring-format-1.s on darwin
gcc/c-family/ChangeLog: PR target/88638 * c-attribs.c (positional_argument): Call valid_format_string_type_p and issue errors if it fails. * c-common.h (valid_format_string_type_p): Declare. * c-format.c (valid_stringptr_type_p): Rename... (valid_format_string_type_p): ...to this and make extern. (handle_format_arg_attribute): Adjust to new name. (check_format_string): Same. gcc/testsuite/ChangeLog: PR target/88638 * gcc.dg/format/attr-8.c: New test. * gcc.dg/darwin-cfstring-format-1.c: Adjust diagnostics. * gcc.dg/format/attr-3.c: Same. * obj-c++.dg/fsf-nsstring-format-1.mm: Same. * objc.dg/fsf-nsstring-format-1.m: Same. gcc/ChangeLog: PR target/88638 * doc/extend.texi (Darwin Format Checks): Clarify. From-SVN: r267922
Diffstat (limited to 'gcc/testsuite/objc.dg')
-rw-r--r--gcc/testsuite/objc.dg/fsf-nsstring-format-1.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/objc.dg/fsf-nsstring-format-1.m b/gcc/testsuite/objc.dg/fsf-nsstring-format-1.m
index ecbad43..e29358c 100644
--- a/gcc/testsuite/objc.dg/fsf-nsstring-format-1.m
+++ b/gcc/testsuite/objc.dg/fsf-nsstring-format-1.m
@@ -21,7 +21,7 @@ int s1b (NSString *fmt, ...) __attribute__((format(CFString, 1, 2))) ; /* { dg-e
int s2 (int a, NSString *fmt, ... ) __attribute__((format(__NSString__, 2, 3))) ; /* OK */
-int s2a (int a, NSString *fmt, ... ) __attribute__((format(NSString, 2, 2))) ; /* { dg-error "format string argument follows the args to be formatted" } */
+int s2a (int a, NSString *fmt, ... ) __attribute__((format(NSString, 2, 2))) ; /* { dg-error ".format. attribute argument 3 value .2. does not refer to a variable argument list" } */
int s3 (const char *fmt, ... ) __attribute__((format(__NSString__, 1, 2))) ; /* { dg-error "format argument should be a .NSString. reference but a string was found" } */
int s4 (NSString *fmt, ... ) __attribute__((format(printf, 1, 2))) ; /* { dg-error "found a .NSString. reference but the format argument should be a string" } */
@@ -29,7 +29,7 @@ int s4 (NSString *fmt, ... ) __attribute__((format(printf, 1, 2))) ; /* { dg-err
char *s5 (char dum, char *fmt1, ... ) __attribute__((format_arg(2))) ; /* OK */
NSString *s6 (NSString *dum, NSString *fmt1, ... ) __attribute__((format_arg(2))) ; /* OK */
-char *s7 (int dum, void *fmt1, ... ) __attribute__((format_arg(2))) ; /* { dg-error "format string argument is not a string type" } */
+char *s7 (int dum, void *fmt1, ... ) __attribute__((format_arg(2))) ; /* { dg-error ".format_arg. attribute argument value .2. refers to parameter type .void \\\*." } */
int s8 (NSString *dum, NSString *fmt1, ... ) __attribute__((format_arg(2))) ; /* { dg-error "function does not return string type" } */
char *s9 (int dum, char *fmt1, ... ) __attribute__((format_arg(2))) ; /* OK */