summaryrefslogtreecommitdiff
path: root/gcc/builtin-attrs.def
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/builtin-attrs.def
parentac787142717c501da2268d1992d85309eeeaea45 (diff)
downloadlinaro-gcc-0390133031a20f422ddbd365dd9d6ab71e8eca4a.tar.gz
linaro-gcc-0390133031a20f422ddbd365dd9d6ab71e8eca4a.tar.bz2
linaro-gcc-0390133031a20f422ddbd365dd9d6ab71e8eca4a.zip
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/builtin-attrs.def')
-rw-r--r--gcc/builtin-attrs.def18
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def
index b307151d508..7bdbd628086 100644
--- a/gcc/builtin-attrs.def
+++ b/gcc/builtin-attrs.def
@@ -102,9 +102,12 @@ DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN, \
DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC, \
ATTR_NULL, ATTR_NOTHROW_LIST)
-DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, ATTR_NULL)
-DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, ATTR_NULL)
-DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, ATTR_NULL)
+DEF_ATTR_TREE_LIST (ATTR_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \
+ ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_NONNULL_2, ATTR_NONNULL, ATTR_LIST_2, \
+ ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_NONNULL_3, ATTR_NONNULL, ATTR_LIST_3, \
+ ATTR_NOTHROW_LIST)
/* Construct a tree for a format attribute. */
#define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES) \
@@ -149,13 +152,8 @@ DEF_FORMAT_ARG_ATTRIBUTE(2)
/* Functions from ISO/IEC 9899:1990. */
#define DEF_C89_ATTR(NAME, ATTRS) DEF_FN_ATTR_IDENT (NAME, ATTRS, flag_hosted)
-DEF_C89_ATTR (sprintf, ATTR_FORMAT_PRINTF_2_3)
-DEF_C89_ATTR (scanf, ATTR_FORMAT_SCANF_1_2)
DEF_C89_ATTR (fscanf, ATTR_FORMAT_SCANF_2_3)
-DEF_C89_ATTR (sscanf, ATTR_FORMAT_SCANF_2_3)
-DEF_C89_ATTR (vprintf, ATTR_FORMAT_PRINTF_1_0)
DEF_C89_ATTR (vfprintf, ATTR_FORMAT_PRINTF_2_0)
-DEF_C89_ATTR (vsprintf, ATTR_FORMAT_PRINTF_2_0)
DEF_C89_ATTR (strftime, ATTR_FORMAT_STRFTIME_3_0)
#undef DEF_C89_ATTR
@@ -164,11 +162,7 @@ DEF_C89_ATTR (strftime, ATTR_FORMAT_STRFTIME_3_0)
DEF_FN_ATTR_IDENT (NAME, ATTRS, \
(flag_hosted \
&& (flag_isoc99 || flag_noniso_default_format_attributes)))
-DEF_C99_ATTR (snprintf, ATTR_FORMAT_PRINTF_3_4)
-DEF_C99_ATTR (vsnprintf, ATTR_FORMAT_PRINTF_3_0)
-DEF_C99_ATTR (vscanf, ATTR_FORMAT_SCANF_1_0)
DEF_C99_ATTR (vfscanf, ATTR_FORMAT_SCANF_2_0)
-DEF_C99_ATTR (vsscanf, ATTR_FORMAT_SCANF_2_0)
#undef DEF_C99_ATTR
/* Functions not in any version of ISO C. */