]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/extensions-to-the-c-language-family/format-checks-specific-to-particular-target-machines.rst
97d88a7d128bf5f6c5ccdfbedea8b356bfa356fc
[thirdparty/gcc.git] / gcc / doc / gcc / extensions-to-the-c-language-family / format-checks-specific-to-particular-target-machines.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _target-format-checks:
7
8 Format Checks Specific to Particular Target Machines
9 ****************************************************
10
11 For some target machines, GCC supports additional options to the
12 format attribute
13 (see :ref:`function-attributes`).
14
15 .. toctree::
16 :maxdepth: 2
17
18
19 .. _solaris-format-checks:
20
21 Solaris Format Checks
22 ^^^^^^^^^^^^^^^^^^^^^
23
24 Solaris targets support the ``cmn_err`` (or ``__cmn_err__``) format
25 check. ``cmn_err`` accepts a subset of the standard ``printf``
26 conversions, and the two-argument ``%b`` conversion for displaying
27 bit-fields. See the Solaris man page for ``cmn_err`` for more information.
28
29 .. _darwin-format-checks:
30
31 Darwin Format Checks
32 ^^^^^^^^^^^^^^^^^^^^
33
34 In addition to the full set of format archetypes (attribute format style
35 arguments such as ``printf``, ``scanf``, ``strftime``, and
36 ``strfmon``), Darwin targets also support the ``CFString`` (or
37 ``__CFString__``) archetype in the ``format`` attribute.
38 Declarations with this archetype are parsed for correct syntax
39 and argument types. However, parsing of the format string itself and
40 validating arguments against it in calls to such functions is currently
41 not performed.
42
43 Additionally, ``CFStringRefs`` (defined by the ``CoreFoundation`` headers) may
44 also be used as format arguments. Note that the relevant headers are only likely to be
45 available on Darwin (OSX) installations. On such installations, the XCode and system
46 documentation provide descriptions of ``CFString``, ``CFStringRefs`` and
47 associated functions.