aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
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/doc
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/doc')
-rw-r--r--gcc/doc/extend.texi12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index f013057..c81092d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -22397,10 +22397,14 @@ bit-fields. See the Solaris man page for @code{cmn_err} for more information.
@node Darwin Format Checks
@subsection Darwin Format Checks
-Darwin targets support the @code{CFString} (or @code{__CFString__}) in the format
-attribute context. Declarations made with such attribution are parsed for correct syntax
-and format argument types. However, parsing of the format string itself is currently undefined
-and is not carried out by this version of the compiler.
+In addition to the full set of format archetypes (attribute format style
+arguments such as @code{printf}, @code{scanf}, @code{strftime}, and
+@code{strfmon}), Darwin targets also support the @code{CFString} (or
+@code{__CFString__}) archetype in the @code{format} attribute.
+Declarations with this archetype are parsed for correct syntax
+and argument types. However, parsing of the format string itself and
+validating arguments against it in calls to such functions is currently
+not performed.
Additionally, @code{CFStringRefs} (defined by the @code{CoreFoundation} headers) may
also be used as format arguments. Note that the relevant headers are only likely to be