]> sourceware.org Git - glibc.git/commitdiff
Document interaction with GCC built-ins in the Customizing Printf
authorMartin Sebor <msebor@redhat.com>
Fri, 29 Jun 2018 16:45:19 +0000 (10:45 -0600)
committerMartin Sebor <msebor@redhat.com>
Fri, 29 Jun 2018 16:45:19 +0000 (10:45 -0600)
section of the manual.

ChangeLog
manual/stdio.texi

index 566b5e00ea0e90ba794d1645a0d7a3639edf0264..0c79b86a760964ab794cbd592d145e081cccab6d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-29  Martin Sebor  <msebor@redhat.com>
+
+       * manual/stdio.texi (Customizing Printf): Mention interaction
+       with GCC built-ins.
+
 2018-06-29  Maciej W. Rozycki  <macro@mips.com>
 
        [BZ #23307]
index 379f003b3fd507bf9a549cacca0f1e0125c3d1ac..bbd3061bab908a6332d5cc3c16f98ad1383c3f5f 100644 (file)
@@ -2962,7 +2962,11 @@ The facilities of this section are declared in the header file
 
 @strong{Portability Note:} The ability to extend the syntax of
 @code{printf} template strings is a GNU extension.  ISO standard C has
-nothing similar.
+nothing similar.  When using the GNU C compiler or any other compiler
+that interprets calls to standard I/O functions according to the rules
+of the language standard it is necessary to disable such handling by
+the appropriate compiler option.  Otherwise the behavior of a program
+that relies on the extension is undefined.
 
 @node Registering New Conversions
 @subsection Registering New Conversions
@@ -3016,9 +3020,13 @@ function when this format specifier appears in the format string.
 The return value is @code{0} on success, and @code{-1} on failure
 (which occurs if @var{spec} is out of range).
 
-You can redefine the standard output conversions, but this is probably
-not a good idea because of the potential for confusion.  Library routines
-written by other people could break if you do this.
+@strong{Portability Note:} It is possible to redefine the standard output
+conversions but doing so is strongly discouraged because it may interfere
+with the behavior of programs and compiler implementations that assume
+the effects of the conversions conform to the relevant language standards.
+In addition, conforming compilers need not guarantee that the function
+registered for a standard conversion will be called for each such
+conversion in every format string in a program.
 @end deftypefun
 
 @node Conversion Specifier Options
This page took 0.070843 seconds and 5 git commands to generate.