summaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-02 01:34:34 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-02 01:34:34 +0000
commit0390133031a20f422ddbd365dd9d6ab71e8eca4a (patch)
tree13a26927c2fd8d16601ecab3d5325e98595e4c07 /gcc/doc/extend.texi
parentac787142717c501da2268d1992d85309eeeaea45 (diff)
downloadgcc-0390133031a20f422ddbd365dd9d6ab71e8eca4a.tar.gz
PR c++/9367
* builtin-types.def (DEF_FUNCTION_TYPE_VAR_3): New macro. (BT_FN_INT_CONST_STRING_VALIST_ARG, BT_FN_INT_STRING_CONST_STRING_VALIST_ARG, BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG, BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG, BT_FN_INT_STRING_CONST_STRING_VAR, BT_FN_INT_CONST_STRING_CONST_STRING_VAR, BT_FN_INT_STRING_SIZE_CONST_STRING_VAR): New built-in types. * builtin-attrs.def (ATTR_NONNULL_1, ATTR_NONNULL_2, ATTR_NONNULL_3): Also include the nothrow attribute. (sprintf, scanf, sscanf, vprintf, vsprintf, snprintf, vsnprintf, vscanf, vsscanf): Don't define attributes here. * builtins.def (putchar, puts): Make full C89 built-ins. (snprintf, sprintf, scanf, sscanf, vprintf, vscanf, vsscanf, vsnprintf, vsprintf): New built-ins. * c-common.c (c_common_nodes_and_builtins): Handle new macro DEF_FUNCTION_TYPE_VAR_3. * doc/extend.texi: Document these new built-in functions. * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3. (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3. * g++.old-deja/g++.other/builtins10.C: New test for PR 9367. * gcc.dg/format/attr-5.c: Handle new conflicting types warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi30
1 files changed, 23 insertions, 7 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e148c2f046c..a74c7513bb5 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -4591,16 +4591,22 @@ v4si f (v4si a, v4si b, v4si c)
@findex powl
@findex printf
@findex printf_unlocked
+@findex putchar
+@findex puts
@findex rindex
@findex round
@findex roundf
@findex roundl
+@findex scanf
@findex sin
@findex sinf
@findex sinl
+@findex snprintf
+@findex sprintf
@findex sqrt
@findex sqrtf
@findex sqrtl
+@findex sscanf
@findex strcat
@findex strchr
@findex strcmp
@@ -4617,6 +4623,11 @@ v4si f (v4si a, v4si b, v4si c)
@findex trunc
@findex truncf
@findex truncl
+@findex vprintf
+@findex vscanf
+@findex vsnprintf
+@findex vsprintf
+@findex vsscanf
GCC provides a large number of built-in functions other than the ones
mentioned above. Some of these are for internal use in the processing
@@ -4648,10 +4659,12 @@ mode.
The ISO C99 functions @code{conj}, @code{conjf}, @code{conjl}, @code{creal},
@code{crealf}, @code{creall}, @code{cimag}, @code{cimagf}, @code{cimagl},
-@code{_Exit},
-@code{llabs}, @code{imaxabs}, @code{round}, @code{roundf}, @code{roundl},
-@code{trunc}, @code{truncf}, @code{truncl}, @code{nearbyint},
-@code{nearbyintf} and @code{nearbyintl} are handled as built-in functions
+@code{_Exit}, @code{imaxabs}, @code{llabs},
+@code{nearbyint}, @code{nearbyintf}, @code{nearbyintl},
+@code{round}, @code{roundf}, @code{roundl}, @code{snprintf},
+@code{trunc}, @code{truncf}, @code{truncl},
+@code{vscanf}, @code{vsnprintf} and @code{vsscanf}
+are handled as built-in functions
except in strict ISO C90 mode (@option{-ansi} or @option{-std=c89}).
There are also built-in versions of the ISO C99 functions @code{atan2f},
@@ -4669,10 +4682,13 @@ The ISO C90 functions @code{abort}, @code{abs}, @code{atan2}, @code{ceil},
@code{exp}, @code{fabs}, @code{floor}, @code{fmod},
@code{fprintf}, @code{fputs}, @code{labs}, @code{log},
@code{memcmp}, @code{memcpy}, @code{memset}, @code{pow}, @code{printf},
-@code{sin}, @code{sqrt}, @code{strcat}, @code{strchr}, @code{strcmp},
+@code{putchar}, @code{puts}, @code{scanf}, @code{sin}, @code{snprintf},
+@code{sprintf}, code{sqrt}, @code{sscanf},
+@code{strcat}, @code{strchr}, @code{strcmp},
@code{strcpy}, @code{strcspn}, @code{strlen}, @code{strncat}, @code{strncmp},
-@code{strncpy}, @code{strpbrk}, @code{strrchr}, @code{strspn}, and
-@code{strstr} are all recognized as built-in functions unless
+@code{strncpy}, @code{strpbrk}, @code{strrchr}, @code{strspn}, @code{strstr},
+@code{vprintf} and @code{vsprintf}
+are all recognized as built-in functions unless
@option{-fno-builtin} is specified (or @option{-fno-builtin-@var{function}}
is specified for an individual function). All of these functions have
corresponding versions prefixed with @code{__builtin_}.