diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-07-26 13:27:20 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-07-26 13:27:20 +0000 |
commit | cc42f5f54cd6dc6c0b6b8409acb7e77dd8253c66 (patch) | |
tree | 6f32d1872bc490cd139e7966725d23ea3bc810b8 /gcc/builtins.def | |
parent | 92e7a6efaffc9b4a26754c3b0263c9b452113435 (diff) | |
download | gcc-cc42f5f54cd6dc6c0b6b8409acb7e77dd8253c66.zip gcc-cc42f5f54cd6dc6c0b6b8409acb7e77dd8253c66.tar.gz gcc-cc42f5f54cd6dc6c0b6b8409acb7e77dd8253c66.tar.bz2 |
builtins.def (DEF_FALLBACK_BUILTIN): Delete.
* builtins.def (DEF_FALLBACK_BUILTIN): Delete.
(DEF_EXT_FALLBACK_BUILTIN): Delete.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Declare using
the regular DEF_EXT_LIB_BUILTIN macro.
(BUILT_IN_FPUTC, BUILT_IN_FPUTS, BUILT_IN_FWRITE): Declare using
the regular DEF_LIB_BUILTIN macro.
(BUILT_IN_PUTCHAR_UNLOCKED, BUILT_IN_PUTS_UNLOCKED,
BUILT_IN_FPUTC_UNLOCKED, BUILT_IN_FPUTS_UNLOCKED,
BUILT_IN_FWRITE_UNLOCKED): Declare using the regular
DEF_EXT_LIB_BUILTIN macro.
* c-decl.c (duplicate_decls): Remove code to handle builtin
functions prototyped without an argument list.
From-SVN: r69814
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r-- | gcc/builtins.def | 124 |
1 files changed, 46 insertions, 78 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def index e05795d..47cb7fc 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -70,24 +70,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \ false, false, false, ATTRS, true) -/* A fallback builtin is a builtin (like __builtin_puts) that falls - back to the corresponding library function if necessary -- but - for which we should not introduce the non-`__builtin' variant of - the name. */ -#undef DEF_FALLBACK_BUILTIN -#define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ - DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - false, true, false, ATTRS, true) - -/* Like DEF_FALLBACK_BUILTIN, except that the function is not one that - is specified by ANSI/ISO C. So, when we're being fully conformant - we ignore the version of these builtins that does not begin with - __builtin. */ -#undef DEF_EXT_FALLBACK_BUILTIN -#define DEF_EXT_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ - DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - false, true, true, ATTRS, true) - /* A library builtin (like __builtin_strchr) is a builtin equivalent of an ANSI/ISO standard library function. In addition to the `__builtin' version, we will create an ordinary version (e.g, @@ -273,33 +255,20 @@ DEF_C99_BUILTIN(BUILT_IN_CABSL, BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, ATTR_CONST_NOTHROW_LIST) -/* The system prototypes for `bzero', 'bcopy' and `bcmp' functions - have many variations, so don't specify parameters to avoid - conflicts. The expand_* functions check the argument types anyway. - In addition, these functions have traditionally accepted NULL - pointers when the length parameter is zero, so don't apply - attribute "nonnull". */ -DEF_BUILTIN (BUILT_IN_BZERO, - "__builtin_bzero", - BUILT_IN_NORMAL, - BT_FN_VOID_PTR_SIZE, - BT_FN_VOID_VAR, - true, true, true, - ATTR_NOTHROW_LIST, false) -DEF_BUILTIN (BUILT_IN_BCOPY, - "__builtin_bcopy", - BUILT_IN_NORMAL, - BT_FN_VOID_CONST_PTR_PTR_SIZE, - BT_FN_VOID_VAR, - true, true, true, - ATTR_NOTHROW_LIST, false) -DEF_BUILTIN (BUILT_IN_BCMP, - "__builtin_bcmp", - BUILT_IN_NORMAL, - BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, - BT_FN_INT_VAR, - true, true, true, - ATTR_PURE_NOTHROW_LIST, false) +/* These functions have traditionally accepted NULL pointers when the + length parameter is zero, so don't apply attribute "nonnull". */ +DEF_EXT_LIB_BUILTIN(BUILT_IN_BZERO, + "__builtin_bzero", + BT_FN_VOID_PTR_SIZE, + ATTR_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN(BUILT_IN_BCOPY, + "__builtin_bcopy", + BT_FN_VOID_CONST_PTR_PTR_SIZE, + ATTR_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN(BUILT_IN_BCMP, + "__builtin_bcmp", + BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, + ATTR_PURE_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS, "__builtin_ffs", @@ -810,20 +779,18 @@ DEF_LIB_BUILTIN(BUILT_IN_VSPRINTF, regular style declaration since we had to use void* instead of FILE* in the __builtin_ prototype supplied here. */ -DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC, - "__builtin_fputc", - BT_FN_INT_INT_PTR, - ATTR_NOTHROW_NONNULL_2) -DEF_BUILTIN (BUILT_IN_FPUTS, - "__builtin_fputs", - BUILT_IN_NORMAL, - BT_FN_INT_CONST_STRING_PTR, - BT_FN_INT_VAR, - true, true, false, ATTR_NOTHROW_NONNULL_1_2, true) -DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE, - "__builtin_fwrite", - BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, - ATTR_NOTHROW_NONNULL_1_4) +DEF_LIB_BUILTIN(BUILT_IN_FPUTC, + "__builtin_fputc", + BT_FN_INT_INT_PTR, + ATTR_NOTHROW_NONNULL_2) +DEF_LIB_BUILTIN(BUILT_IN_FPUTS, + "__builtin_fputs", + BT_FN_INT_CONST_STRING_PTR, + ATTR_NOTHROW_NONNULL_1_2) +DEF_LIB_BUILTIN(BUILT_IN_FWRITE, + "__builtin_fwrite", + BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, + ATTR_NOTHROW_NONNULL_1_4) DEF_LIB_BUILTIN(BUILT_IN_FPRINTF, "__builtin_fprintf", BT_FN_INT_PTR_CONST_STRING_VAR, @@ -831,12 +798,14 @@ DEF_LIB_BUILTIN(BUILT_IN_FPRINTF, /* stdio unlocked builtins (without FILE *). */ -DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED, - "__builtin_putchar_unlocked", - BT_FN_INT_INT, ATTR_NOTHROW_LIST) -DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTS_UNLOCKED, - "__builtin_puts_unlocked", - BT_FN_INT_CONST_STRING, ATTR_NOTHROW_NONNULL_1) +DEF_EXT_LIB_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED, + "__builtin_putchar_unlocked", + BT_FN_INT_INT, + ATTR_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN(BUILT_IN_PUTS_UNLOCKED, + "__builtin_puts_unlocked", + BT_FN_INT_CONST_STRING, + ATTR_NOTHROW_NONNULL_1) DEF_EXT_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED, "__builtin_printf_unlocked", BT_FN_INT_CONST_STRING_VAR, @@ -849,19 +818,18 @@ DEF_EXT_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED, regular style declaration since we had to use void* instead of FILE* in the __builtin_ prototype supplied here. */ -DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FPUTC_UNLOCKED, - "__builtin_fputc_unlocked", - BT_FN_INT_INT_PTR, ATTR_NOTHROW_NONNULL_2) -DEF_BUILTIN (BUILT_IN_FPUTS_UNLOCKED, - "__builtin_fputs_unlocked", - BUILT_IN_NORMAL, - BT_FN_INT_CONST_STRING_PTR, - BT_FN_INT_VAR, - true, true, true, ATTR_NOTHROW_NONNULL_1_2, true) -DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FWRITE_UNLOCKED, - "__builtin_fwrite_unlocked", - BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, - ATTR_NOTHROW_NONNULL_1_4) +DEF_EXT_LIB_BUILTIN(BUILT_IN_FPUTC_UNLOCKED, + "__builtin_fputc_unlocked", + BT_FN_INT_INT_PTR, + ATTR_NOTHROW_NONNULL_2) +DEF_EXT_LIB_BUILTIN(BUILT_IN_FPUTS_UNLOCKED, + "__builtin_fputs_unlocked", + BT_FN_INT_CONST_STRING_PTR, + ATTR_NOTHROW_NONNULL_1_2) +DEF_EXT_LIB_BUILTIN(BUILT_IN_FWRITE_UNLOCKED, + "__builtin_fwrite_unlocked", + BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR, + ATTR_NOTHROW_NONNULL_1_4) DEF_EXT_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED, "__builtin_fprintf_unlocked", BT_FN_INT_PTR_CONST_STRING_VAR, |