aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-12-21 02:36:37 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-12-21 02:36:37 +0000
commitb4c984fbec1caaaa03c2c2bf2c9b42d3f7679223 (patch)
tree840ebfbffcd09b2abfcb6059dc21b1f965cc1ab5 /gcc/doc
parentbfa8af3e37f63413295d14f15eae6dda770d4a02 (diff)
downloadgcc-b4c984fbec1caaaa03c2c2bf2c9b42d3f7679223.zip
gcc-b4c984fbec1caaaa03c2c2bf2c9b42d3f7679223.tar.gz
gcc-b4c984fbec1caaaa03c2c2bf2c9b42d3f7679223.tar.bz2
builtin-attrs.def (__builtin_printf_unlocked, [...]): Mark with the __printf__ attribute.
* builtin-attrs.def (__builtin_printf_unlocked, __builtin_fprintf_unlocked, printf_unlocked, fprintf_unlocked): Mark with the __printf__ attribute. * builtins.c (expand_builtin_fputs): Add an `unlocked' parameter and set the replacement function depending on it. (expand_builtin): Skip BUILT_IN_*_UNLOCKED when not optimizing. Handle BUILT_IN_*_UNLOCKED when optimizing. * builtins.def (DEF_EXT_FALLBACK_BUILTIN, DEF_EXT_FRONT_END_LIB_BUILTIN): New macros. Declare the "unlocked" stdio functions. * c-common.c (c_expand_builtin_printf, c_expand_builtin_fprintf): Add an `unlocked' parameter and set the replacement function depending on it. (c_expand_builtin): Handle BUILT_IN_PRINTF_UNLOCKED and BUILT_IN_FPRINTF_UNLOCKED. * doc/extend.texi (printf_unlocked, fprintf_unlocked, fputs_unlocked): Document. testsuite: * gcc.dg/format/builtin-1.c: Test unlocked stdio. * gcc.dg/format/c90-printf-3.c: Likewise. * gcc.dg/format/c99-printf-3.c: Likewise. * gcc.dg/format/ext-1.c: Likewise. * gcc.dg/format/ext-6.c: Likewise. * gcc.dg/format/format.h: Prototype unlocked stdio. From-SVN: r48229
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index a9f659d..a224770 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2047,7 +2047,8 @@ warnings are requested (using @option{-Wformat}), so there is no need to
modify the header file @file{stdio.h}. In C99 mode, the functions
@code{snprintf}, @code{vsnprintf}, @code{vscanf}, @code{vfscanf} and
@code{vsscanf} are also checked. Except in strictly conforming C
-standard modes, the X/Open function @code{strfmon} is also checked.
+standard modes, the X/Open function @code{strfmon} is also checked as
+are @code{printf_unlocked} and @code{fprintf_unlocked}.
@xref{C Dialect Options,,Options Controlling C Dialect}.
@item format_arg (@var{string-index})
@@ -4259,7 +4260,9 @@ v4si f (v4si a, v4si b, v4si c)
@findex fabsl
@findex ffs
@findex fprintf
+@findex fprintf_unlocked
@findex fputs
+@findex fputs_unlocked
@findex imaxabs
@findex index
@findex labs
@@ -4268,6 +4271,7 @@ v4si f (v4si a, v4si b, v4si c)
@findex memcpy
@findex memset
@findex printf
+@findex printf_unlocked
@findex rindex
@findex sin
@findex sinf
@@ -4315,8 +4319,9 @@ in. @code{_exit} is not recognized in strict ISO C mode (@option{-ansi},
strict C89 mode (@option{-ansi} or @option{-std=c89}).
Outside strict ISO C mode, the functions @code{alloca}, @code{bcmp},
-@code{bzero}, @code{index}, @code{rindex} and @code{ffs} may be handled
-as built-in functions. All these functions have corresponding versions
+@code{bzero}, @code{index}, @code{rindex}, @code{ffs}, @code{fputs_unlocked},
+@code{printf_unlocked} and @code{fprintf_unlocked} may be handled as
+built-in functions. All these functions have corresponding versions
prefixed with @code{__builtin_}, which may be used even in strict C89
mode.