2000-03-23 01:20:37 +01:00
|
|
|
/* This file contains the definitions and documentation for the
|
|
|
|
builtins used in the GNU compiler.
|
builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
* builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
(BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE): Likewise.
(BT_FN_DOUBLE_DOUBLE_DOUBLE): Likewise.
* builtins.def: Define pow, powf, powl, atan2, atan2f and atan2l
builtin functions (and their __builtin_* variants).
* builtins.c (mathfn_built_in): Handle missing log{,f,l} cases.
(expand_builtin): Don't expand log{,f,l}, pow{,f,l} or atan2{,f,l}
when not optimizing.
* doc/extend.texi: Document new pow and atan2 builtins, and
their float and long double variants. Realphabetize builtins.
* testsuite/gcc.dg/builtins-4.c: New test case.
From-SVN: r62551
2003-02-07 23:37:57 +01:00
|
|
|
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
This file is part of GCC.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free
|
|
|
|
Software Foundation; either version 2, or (at your option) any later
|
|
|
|
version.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
for more details.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
|
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA. */
|
2000-03-23 01:20:37 +01:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
/* Before including this file, you should define a macro:
|
|
|
|
|
|
|
|
DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
This macro will be called once for each builtin function. The
|
|
|
|
ENUM will be of type `enum built_in_function', and will indicate
|
|
|
|
which builtin function is being processed. The NAME of the builtin
|
|
|
|
function (which will always start with `__builtin_') is a string
|
|
|
|
literal. The CLASS is of type `enum built_in_class' and indicates
|
|
|
|
what kind of builtin is being processed.
|
|
|
|
|
|
|
|
Some builtins are actually two separate functions. For example,
|
|
|
|
for `strcmp' there are two builtin functions; `__builtin_strcmp'
|
|
|
|
and `strcmp' itself. Both behave identically. Other builtins
|
|
|
|
define only the `__builtin' variant. If BOTH_P is TRUE, then this
|
|
|
|
builtin has both variants; otherwise, it is has only the first
|
|
|
|
variant.
|
|
|
|
|
|
|
|
TYPE indicates the type of the function. The symbols correspond to
|
|
|
|
enumerals from builtin-types.def. If BOTH_P is true, then LIBTYPE
|
|
|
|
is the type of the non-`__builtin_' variant. Otherwise, LIBTYPE
|
|
|
|
should be ignored.
|
|
|
|
|
|
|
|
If FALLBACK_P is true then, if for some reason, the compiler cannot
|
|
|
|
expand the builtin function directly, it will call the
|
|
|
|
corresponding library function (which does not have the
|
|
|
|
`__builtin_' prefix.
|
|
|
|
|
|
|
|
If NONANSI_P is true, then the non-`__builtin_' variant is not an
|
|
|
|
ANSI/ISO library function, and so we should pretend it does not
|
2002-07-06 02:16:44 +02:00
|
|
|
exist when compiling in ANSI conformant mode.
|
|
|
|
|
|
|
|
ATTRs is an attribute list as defined in builtin-attrs.def that
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
describes the attributes of this builtin function.
|
|
|
|
|
|
|
|
IMPLICIT specifies condition when the builtin can be produced by
|
|
|
|
compiler. For instance C90 reserves floorf function, but does not
|
|
|
|
define it's meaning. When user uses floorf we may assume that the
|
|
|
|
floorf has the meaning we expect, but we can't produce floorf by
|
2003-03-09 16:22:56 +01:00
|
|
|
simplifying floor((double)float) since the runtime need not implement
|
|
|
|
it. */
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* A GCC builtin (like __builtin_saveregs) is provided by the
|
|
|
|
compiler, but does not correspond to a function in the standard
|
|
|
|
library. */
|
|
|
|
#undef DEF_GCC_BUILTIN
|
2002-07-28 07:34:04 +02:00
|
|
|
#define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
false, false, false, ATTRS, true)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* A library builtin (like __builtin_strchr) is a builtin equivalent
|
|
|
|
of an ANSI/ISO standard library function. In addition to the
|
2001-10-31 15:08:11 +01:00
|
|
|
`__builtin' version, we will create an ordinary version (e.g,
|
2001-05-25 22:00:59 +02:00
|
|
|
`strchr') as well. If we cannot compute the answer using the
|
|
|
|
builtin function, we will fall back to the standard library
|
2002-09-29 15:16:44 +02:00
|
|
|
version. */
|
2001-05-25 22:00:59 +02:00
|
|
|
#undef DEF_LIB_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
true, true, false, ATTRS, true)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Like DEF_LIB_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_LIB_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
true, true, true, ATTRS, false)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Like DEF_LIB_BUILTIN, except that the function is only a part of
|
|
|
|
the standard in C99 or above. */
|
|
|
|
#undef DEF_C99_BUILTIN
|
2002-12-16 19:23:00 +01:00
|
|
|
#define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS)
|
|
|
|
|
|
|
|
/* Builtin that is specified by C99 and C90 reserve the name for future use.
|
|
|
|
We can still recognize the builtin in C90 mode but we can't produce it
|
|
|
|
implicitly. */
|
|
|
|
#undef DEF_C99_C90RES_BUILTIN
|
|
|
|
#define DEF_C99_C90RES_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
|
|
|
true, true, !flag_isoc99, ATTRS, TARGET_C99_FUNCTIONS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2001-12-21 03:36:37 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_ABORT,
|
|
|
|
"__builtin_abort",
|
|
|
|
BT_FN_VOID,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_ABS,
|
|
|
|
"__builtin_abs",
|
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
|
|
|
|
"__builtin_aggregate_incoming_address",
|
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
|
|
|
|
"__builtin_alloca",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_PTR_SIZE,
|
|
|
|
ATTR_MALLOC_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_APPLY,
|
|
|
|
"__builtin_apply",
|
|
|
|
BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS,
|
|
|
|
"__builtin_apply_args",
|
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO,
|
|
|
|
"__builtin_args_info",
|
builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
(fmod,fmodf,fmodl): New built-in functions.
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
* doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins.
From-SVN: r63445
2003-02-26 04:02:14 +01:00
|
|
|
BT_FN_INT_INT,
|
2003-07-31 05:16:24 +02:00
|
|
|
ATTR_NULL)
|
builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
(fmod,fmodf,fmodl): New built-in functions.
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
* doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins.
From-SVN: r63445
2003-02-26 04:02:14 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_ATAN,
|
|
|
|
"__builtin_atan",
|
builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
(fmod,fmodf,fmodl): New built-in functions.
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
* doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins.
From-SVN: r63445
2003-02-26 04:02:14 +01:00
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_ATANF,
|
|
|
|
"__builtin_atanf",
|
builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
(fmod,fmodf,fmodl): New built-in functions.
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
* doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins.
From-SVN: r63445
2003-02-26 04:02:14 +01:00
|
|
|
BT_FN_FLOAT_FLOAT,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_ATANL,
|
|
|
|
"__builtin_atanl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_ATAN2,
|
|
|
|
"__builtin_atan2",
|
|
|
|
BT_FN_DOUBLE_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_ATAN2F,
|
|
|
|
"__builtin_atan2f",
|
|
|
|
BT_FN_FLOAT_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_ATAN2L,
|
|
|
|
"__builtin_atan2l",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
/* bcmp has traditionally accepted NULL pointers when the length
|
|
|
|
parameter is zero, so don't apply attribute "nonnull". */
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_BCMP,
|
|
|
|
"__builtin_bcmp",
|
|
|
|
BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
/* bcopy has traditionally accepted NULL pointers when the length
|
|
|
|
parameter is zero, so don't apply attribute "nonnull". */
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_BCOPY,
|
|
|
|
"__builtin_bcopy",
|
|
|
|
BT_FN_VOID_CONST_PTR_PTR_SIZE,
|
|
|
|
ATTR_NOTHROW_LIST)
|
|
|
|
|
|
|
|
/* bzero has traditionally accepted a NULL pointer 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_C99_BUILTIN(BUILT_IN_CABS,
|
|
|
|
"__builtin_cabs",
|
|
|
|
BT_FN_DOUBLE_COMPLEX_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CABSF,
|
|
|
|
"__builtin_cabsf",
|
|
|
|
BT_FN_FLOAT_COMPLEX_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CABSL,
|
|
|
|
"__builtin_cabsl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_COMPLEX_LONGDOUBLE,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_CALLOC,
|
|
|
|
"__builtin_calloc",
|
|
|
|
BT_FN_PTR_SIZE_SIZE,
|
|
|
|
ATTR_MALLOC_NOTHROW_LIST)
|
2002-12-16 19:23:00 +01:00
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_CEIL,
|
|
|
|
"__builtin_ceil",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_CEILF,
|
|
|
|
"__builtin_ceilf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_CEILL,
|
|
|
|
"__builtin_ceill",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-12-16 19:23:00 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CIMAG,
|
|
|
|
"__builtin_cimag",
|
|
|
|
BT_FN_DOUBLE_COMPLEX_DOUBLE,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CIMAGF,
|
|
|
|
"__builtin_cimagf",
|
|
|
|
BT_FN_FLOAT_COMPLEX_FLOAT,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CIMAGL,
|
|
|
|
"__builtin_cimagl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_COMPLEX_LONGDOUBLE,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE,
|
|
|
|
"__builtin_classify_type",
|
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CLZ,
|
|
|
|
"__builtin_clz",
|
|
|
|
BT_FN_INT_INT,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CLZL,
|
|
|
|
"__builtin_clzl",
|
|
|
|
BT_FN_INT_LONG,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CLZLL,
|
|
|
|
"__builtin_clzll",
|
|
|
|
BT_FN_INT_LONGLONG,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CONJ,
|
|
|
|
"__builtin_conj",
|
2002-12-16 19:23:00 +01:00
|
|
|
BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CONJF,
|
|
|
|
"__builtin_conjf",
|
2002-12-16 19:23:00 +01:00
|
|
|
BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CONJL,
|
|
|
|
"__builtin_conjl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P,
|
|
|
|
"__builtin_constant_p",
|
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_COS,
|
|
|
|
"__builtin_cos",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_COSF,
|
|
|
|
"__builtin_cosf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_COSL,
|
|
|
|
"__builtin_cosl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CREAL,
|
|
|
|
"__builtin_creal",
|
2002-12-16 19:23:00 +01:00
|
|
|
BT_FN_DOUBLE_COMPLEX_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CREALF,
|
|
|
|
"__builtin_crealf",
|
2002-12-16 19:23:00 +01:00
|
|
|
BT_FN_FLOAT_COMPLEX_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CREALL,
|
|
|
|
"__builtin_creall",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_COMPLEX_LONGDOUBLE,
|
2002-12-16 19:23:00 +01:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CTZ,
|
|
|
|
"__builtin_ctz",
|
|
|
|
BT_FN_INT_INT,
|
builtins.def (BUILT_IN_CABS, [...]): New builtins representing ISO C99's cabs, cabsf and cabsl.
* builtins.def (BUILT_IN_CABS, BUILT_IN_CABSF, BUILT_IN_CABSL):
New builtins representing ISO C99's cabs, cabsf and cabsl.
* builtins.c (expand_builtin_fabs): New function.
(expand_builtin_cabs): New function.
(expand_builtin): Expand BUILT_IN_FABS{,F,L} and BUILT_IN_CABS{,F,L}
using expand_builtin_fabs and expand_builtin_cabs respectively.
* doc/extend.texi: Document new cabs, cabsf and cabsl builtins.
* gcc.dg/builtins-16.c: New test case.
From-SVN: r67368
2003-06-03 13:27:23 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CTZL,
|
|
|
|
"__builtin_ctzl",
|
|
|
|
BT_FN_INT_LONG,
|
builtins.def (BUILT_IN_CABS, [...]): New builtins representing ISO C99's cabs, cabsf and cabsl.
* builtins.def (BUILT_IN_CABS, BUILT_IN_CABSF, BUILT_IN_CABSL):
New builtins representing ISO C99's cabs, cabsf and cabsl.
* builtins.c (expand_builtin_fabs): New function.
(expand_builtin_cabs): New function.
(expand_builtin): Expand BUILT_IN_FABS{,F,L} and BUILT_IN_CABS{,F,L}
using expand_builtin_fabs and expand_builtin_cabs respectively.
* doc/extend.texi: Document new cabs, cabsf and cabsl builtins.
* gcc.dg/builtins-16.c: New test case.
From-SVN: r67368
2003-06-03 13:27:23 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CTZLL,
|
|
|
|
"__builtin_ctzll",
|
|
|
|
BT_FN_INT_LONGLONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA,
|
|
|
|
"__builtin_dwarf_cfa",
|
|
|
|
BT_FN_PTR,
|
|
|
|
ATTR_NULL)
|
[multiple changes]
2003-02-01 Richard Henderson <rth@redhat.com>
* optabs.c (expand_unop): Use word_mode for outmode of bit scaners.
* libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change
return type to Wtype.
* libgcc-std.ver (GCC_3.4): Fix inheritance.
* config/i386/i386.md (ffssi2): Use nonimmediate_operand for
expander input constraint.
2003-02-01 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and
OTI_parity.
(clz_optab, ctz_optab, popcount_optab, parity_optab): New.
* optabs.c (widen_clz, expand_parity): New.
(expand_unop): Handle clz and parity. Hardcode SImode as outmode
for libcalls to clz, ctz, popcount, and parity.
(init_optabs): Init clz_optab, ctz_optab, popcount_optab and
parity_optab, and set up libfunc handlers.
* libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2,
__popcount_tab): New.
* libgcc2.h: Declare them.
* libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c.
* genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab
and parity_optab.
* builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New.
* builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT,
BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL,
BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL,
BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL,
BUILT_IN_PARITYLL): New.
* builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs
and add optab argument.
(expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*.
* tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New.
* expr.c (expand_expr): Handle them.
* fold-const.c (tree_expr_nonnegative_p): Likewise.
* rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New.
* reload1.c (eliminate_regs): Handle them.
(elimination_effects): Likewise.
* function.c (instantiate_virtual_regs_1): Likewise
* genattrtab.c (check_attr_value): Likewise.
* simplify-rtx.c (simplify_unary_operation): Likewise.
* c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR.
* combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY.
(nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY.
* config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New.
* config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to
__builtin_arm_clz.
* Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move...
* mklibgcc.in (lib2funcs): ...here and merge. Add new members.
* doc/extend.texi (Other Builtins): Add new builtins.
* doc/md.texi (Standard Names): Add new patterns.
From-SVN: r62252
2003-02-01 20:00:02 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_DWARF_SP_COLUMN,
|
|
|
|
"__builtin_dwarf_sp_column",
|
|
|
|
BT_FN_UNSIGNED,
|
|
|
|
ATTR_NULL)
|
[multiple changes]
2003-02-01 Richard Henderson <rth@redhat.com>
* optabs.c (expand_unop): Use word_mode for outmode of bit scaners.
* libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change
return type to Wtype.
* libgcc-std.ver (GCC_3.4): Fix inheritance.
* config/i386/i386.md (ffssi2): Use nonimmediate_operand for
expander input constraint.
2003-02-01 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and
OTI_parity.
(clz_optab, ctz_optab, popcount_optab, parity_optab): New.
* optabs.c (widen_clz, expand_parity): New.
(expand_unop): Handle clz and parity. Hardcode SImode as outmode
for libcalls to clz, ctz, popcount, and parity.
(init_optabs): Init clz_optab, ctz_optab, popcount_optab and
parity_optab, and set up libfunc handlers.
* libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2,
__popcount_tab): New.
* libgcc2.h: Declare them.
* libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c.
* genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab
and parity_optab.
* builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New.
* builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT,
BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL,
BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL,
BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL,
BUILT_IN_PARITYLL): New.
* builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs
and add optab argument.
(expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*.
* tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New.
* expr.c (expand_expr): Handle them.
* fold-const.c (tree_expr_nonnegative_p): Likewise.
* rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New.
* reload1.c (eliminate_regs): Handle them.
(elimination_effects): Likewise.
* function.c (instantiate_virtual_regs_1): Likewise
* genattrtab.c (check_attr_value): Likewise.
* simplify-rtx.c (simplify_unary_operation): Likewise.
* c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR.
* combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY.
(nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY.
* config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New.
* config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to
__builtin_arm_clz.
* Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move...
* mklibgcc.in (lib2funcs): ...here and merge. Add new members.
* doc/extend.texi (Other Builtins): Add new builtins.
* doc/md.texi (Standard Names): Add new patterns.
From-SVN: r62252
2003-02-01 20:00:02 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN,
|
|
|
|
"__builtin_eh_return",
|
|
|
|
BT_FN_VOID_PTRMODE_PTR,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
[multiple changes]
2003-02-01 Richard Henderson <rth@redhat.com>
* optabs.c (expand_unop): Use word_mode for outmode of bit scaners.
* libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change
return type to Wtype.
* libgcc-std.ver (GCC_3.4): Fix inheritance.
* config/i386/i386.md (ffssi2): Use nonimmediate_operand for
expander input constraint.
2003-02-01 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and
OTI_parity.
(clz_optab, ctz_optab, popcount_optab, parity_optab): New.
* optabs.c (widen_clz, expand_parity): New.
(expand_unop): Handle clz and parity. Hardcode SImode as outmode
for libcalls to clz, ctz, popcount, and parity.
(init_optabs): Init clz_optab, ctz_optab, popcount_optab and
parity_optab, and set up libfunc handlers.
* libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2,
__popcount_tab): New.
* libgcc2.h: Declare them.
* libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c.
* genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab
and parity_optab.
* builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New.
* builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT,
BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL,
BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL,
BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL,
BUILT_IN_PARITYLL): New.
* builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs
and add optab argument.
(expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*.
* tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New.
* expr.c (expand_expr): Handle them.
* fold-const.c (tree_expr_nonnegative_p): Likewise.
* rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New.
* reload1.c (eliminate_regs): Handle them.
(elimination_effects): Likewise.
* function.c (instantiate_virtual_regs_1): Likewise
* genattrtab.c (check_attr_value): Likewise.
* simplify-rtx.c (simplify_unary_operation): Likewise.
* c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR.
* combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY.
(nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY.
* config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New.
* config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to
__builtin_arm_clz.
* Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move...
* mklibgcc.in (lib2funcs): ...here and merge. Add new members.
* doc/extend.texi (Other Builtins): Add new builtins.
* doc/md.texi (Standard Names): Add new patterns.
From-SVN: r62252
2003-02-01 20:00:02 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO,
|
|
|
|
"__builtin_eh_return_data_regno",
|
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_EXIT,
|
|
|
|
"__builtin_exit",
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN__EXIT,
|
|
|
|
"__builtin__exit",
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN__EXIT2,
|
|
|
|
"__builtin__Exit",
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2002-08-04 01:21:31 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_EXP,
|
|
|
|
"__builtin_exp",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_EXPF,
|
|
|
|
"__builtin_expf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtins.c (DEF_BUILTIN): Accept 10 arguments.
* builtins.c (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls): New global array.
(mathfn_built_in): New global function.
(fold_trunc_transparent_mathfn): New static function
(expand_builtin_strstr, expand_bultin_strchr,
expand_builtin_strpbrk, expand_builtin_strcpy,
expand_builtin_strncpy, expand_bultin_strcmp,
expand_bultin_strncat, expand_builtin_fputs): Use
implicint_built_in_decls.
(fold_builtin): Fold floor/trunc/round/ceil/nearbyint.
* builtins.def: Fix comments.
(DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN,
DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN,
DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed.
(DEF_C99_C90RES_BULTIN): New.
(*f, *l builtins): Update.
* c-common.c (DEF_BUILTIN): Initialize implicit array.
(c_expand_builtin_printf, c_expand_builtin_fprintf): Update.
* convert.c (strip_float_extensions): New global function.
* tree.h (DEF_BUILTIN): Accept 10 arguments.
(implicit_built_in_decls, mathfn_built_in, strip_float_extension):
Declare.
* java/builtins.c (define_builtin): Handle implicit.
(DEF_BUILTIN): Update.
* tm.texi (TARGET_C99_FUNCTIONS): Document.
* defaults.h (TARGET_C99_FUNCTIONS): Default to 0.
* config/linux.h (TARGET_C99_FUNCTIONS): Default to 1
when using glibc2.
From-SVN: r61738
2003-01-24 23:07:01 +01:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_EXPL,
|
2003-07-31 05:16:24 +02:00
|
|
|
"__builtin_expl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
* builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
(BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE): Likewise.
(BT_FN_DOUBLE_DOUBLE_DOUBLE): Likewise.
* builtins.def: Define pow, powf, powl, atan2, atan2f and atan2l
builtin functions (and their __builtin_* variants).
* builtins.c (mathfn_built_in): Handle missing log{,f,l} cases.
(expand_builtin): Don't expand log{,f,l}, pow{,f,l} or atan2{,f,l}
when not optimizing.
* doc/extend.texi: Document new pow and atan2 builtins, and
their float and long double variants. Realphabetize builtins.
* testsuite/gcc.dg/builtins-4.c: New test case.
From-SVN: r62551
2003-02-07 23:37:57 +01:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EXPECT,
|
|
|
|
"__builtin_expect",
|
|
|
|
BT_FN_LONG_LONG_LONG,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR,
|
|
|
|
"__builtin_extract_return_addr",
|
|
|
|
BT_FN_PTR_PTR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_FABS,
|
|
|
|
"__builtin_fabs",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_FABSF,
|
|
|
|
"__builtin_fabsf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_FABSL,
|
|
|
|
"__builtin_fabsl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS,
|
|
|
|
"__builtin_ffs",
|
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_FFSL,
|
|
|
|
"__builtin_ffsl",
|
|
|
|
BT_FN_INT_LONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_FFSLL,
|
|
|
|
"__builtin_ffsll",
|
|
|
|
BT_FN_INT_LONGLONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_FLOOR,
|
|
|
|
"__builtin_floor",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_FLOORF,
|
|
|
|
"__builtin_floorf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_FLOORL,
|
|
|
|
"__builtin_floorl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_FMOD,
|
|
|
|
"__builtin_fmod",
|
|
|
|
BT_FN_DOUBLE_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_FMODF,
|
|
|
|
"__builtin_fmodf",
|
|
|
|
BT_FN_FLOAT_FLOAT_FLOAT,
|
builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
* builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
(BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE): Likewise.
(BT_FN_DOUBLE_DOUBLE_DOUBLE): Likewise.
* builtins.def: Define pow, powf, powl, atan2, atan2f and atan2l
builtin functions (and their __builtin_* variants).
* builtins.c (mathfn_built_in): Handle missing log{,f,l} cases.
(expand_builtin): Don't expand log{,f,l}, pow{,f,l} or atan2{,f,l}
when not optimizing.
* doc/extend.texi: Document new pow and atan2 builtins, and
their float and long double variants. Realphabetize builtins.
* testsuite/gcc.dg/builtins-4.c: New test case.
From-SVN: r62551
2003-02-07 23:37:57 +01:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
(fmod,fmodf,fmodl): New built-in functions.
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
* doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins.
From-SVN: r63445
2003-02-26 04:02:14 +01:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_FMODL,
|
|
|
|
"__builtin_fmodl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE,
|
builtins.def (DEF_LIB_ALWAYS_BUILTIN, [...]): Delete.
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
(fmod,fmodf,fmodl): New built-in functions.
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
* doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins.
From-SVN: r63445
2003-02-26 04:02:14 +01:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_FPRINTF,
|
|
|
|
"__builtin_fprintf",
|
|
|
|
BT_FN_INT_PTR_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_2_3)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED,
|
|
|
|
"__builtin_fprintf_unlocked",
|
|
|
|
BT_FN_INT_PTR_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_2_3)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_FPUTC,
|
|
|
|
"__builtin_fputc",
|
|
|
|
BT_FN_INT_INT_PTR,
|
|
|
|
ATTR_NOTHROW_NONNULL_2)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_FPUTC_UNLOCKED,
|
|
|
|
"__builtin_fputc_unlocked",
|
|
|
|
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_EXT_LIB_BUILTIN(BUILT_IN_FPUTS_UNLOCKED,
|
|
|
|
"__builtin_fputs_unlocked",
|
|
|
|
BT_FN_INT_CONST_STRING_PTR,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS,
|
|
|
|
"__builtin_frame_address",
|
|
|
|
BT_FN_PTR_UNSIGNED,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR,
|
|
|
|
"__builtin_frob_return_addr",
|
|
|
|
BT_FN_PTR_PTR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_FWRITE,
|
|
|
|
"__builtin_fwrite",
|
|
|
|
BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_4)
|
|
|
|
|
|
|
|
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_GCC_BUILTIN(BUILT_IN_HUGE_VAL,
|
|
|
|
"__builtin_huge_val",
|
|
|
|
BT_FN_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALF,
|
|
|
|
"__builtin_huge_valf",
|
|
|
|
BT_FN_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALL,
|
|
|
|
"__builtin_huge_vall",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_IMAXABS,
|
|
|
|
"__builtin_imaxabs",
|
|
|
|
BT_FN_INTMAX_INTMAX,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX,
|
|
|
|
"__builtin_index",
|
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1)
|
|
|
|
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INF,
|
|
|
|
"__builtin_inf",
|
|
|
|
BT_FN_DOUBLE,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INFF,
|
|
|
|
"__builtin_inff",
|
|
|
|
BT_FN_FLOAT,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INFL,
|
|
|
|
"__builtin_infl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-09-05 01:21:28 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES,
|
|
|
|
"__builtin_init_dwarf_reg_size_table",
|
|
|
|
BT_FN_VOID_PTR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISGREATER,
|
|
|
|
"__builtin_isgreater",
|
|
|
|
BT_FN_INT_VAR,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL,
|
|
|
|
"__builtin_isgreaterequal",
|
|
|
|
BT_FN_INT_VAR,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISLESS,
|
|
|
|
"__builtin_isless",
|
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL,
|
|
|
|
"__builtin_islessequal",
|
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER,
|
|
|
|
"__builtin_islessgreater",
|
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED,
|
|
|
|
"__builtin_isunordered",
|
|
|
|
BT_FN_INT_VAR,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_LABS,
|
|
|
|
"__builtin_labs",
|
|
|
|
BT_FN_LONG_LONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_LLABS,
|
|
|
|
"__builtin_llabs",
|
|
|
|
BT_FN_LONGLONG_LONGLONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_LOG,
|
|
|
|
"__builtin_log",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGF,
|
|
|
|
"__builtin_logf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGL,
|
|
|
|
"__builtin_logl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_LONGJMP,
|
|
|
|
"__builtin_longjmp",
|
|
|
|
BT_FN_VOID_PTR_INT,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MALLOC,
|
|
|
|
"__builtin_malloc",
|
|
|
|
BT_FN_PTR_SIZE,
|
|
|
|
ATTR_MALLOC_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMCMP,
|
|
|
|
"__builtin_memcmp",
|
|
|
|
BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMCPY,
|
|
|
|
"__builtin_memcpy",
|
|
|
|
BT_FN_PTR_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMMOVE,
|
|
|
|
"__builtin_memmove",
|
|
|
|
BT_FN_PTR_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_MEMPCPY,
|
|
|
|
"__builtin_mempcpy",
|
|
|
|
BT_FN_PTR_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMSET,
|
|
|
|
"__builtin_memset",
|
|
|
|
BT_FN_PTR_PTR_INT_SIZE,
|
|
|
|
ATTR_NOTHROW_NONNULL_1)
|
|
|
|
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NAN,
|
|
|
|
"__builtin_nan",
|
|
|
|
BT_FN_DOUBLE_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_CONST_NOTHROW_NONNULL_1)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANF,
|
|
|
|
"__builtin_nanf",
|
|
|
|
BT_FN_FLOAT_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_CONST_NOTHROW_NONNULL_1)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANL,
|
|
|
|
"__builtin_nanl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_CONST_NOTHROW_NONNULL_1)
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANS,
|
|
|
|
"__builtin_nans",
|
|
|
|
BT_FN_DOUBLE_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_CONST_NOTHROW_NONNULL_1)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANSF,
|
|
|
|
"__builtin_nansf",
|
|
|
|
BT_FN_FLOAT_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_CONST_NOTHROW_NONNULL_1)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANSL,
|
|
|
|
"__builtin_nansl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_CONST_NOTHROW_NONNULL_1)
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_NEARBYINT,
|
|
|
|
"__builtin_nearbyint",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_NEARBYINTF,
|
|
|
|
"__builtin_nearbyintf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_NEARBYINTL,
|
|
|
|
"__builtin_nearbyintl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG,
|
|
|
|
"__builtin_next_arg",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_PARITY,
|
|
|
|
"__builtin_parity",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_INT,
|
2003-05-01 03:27:48 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_PARITYL,
|
|
|
|
"__builtin_parityl",
|
|
|
|
BT_FN_INT_LONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_PARITYLL,
|
|
|
|
"__builtin_parityll",
|
|
|
|
BT_FN_INT_LONGLONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_POPCOUNT,
|
|
|
|
"__builtin_popcount",
|
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_POPCOUNTL,
|
|
|
|
"__builtin_popcountl",
|
|
|
|
BT_FN_INT_LONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_POPCOUNTLL,
|
|
|
|
"__builtin_popcountll",
|
|
|
|
BT_FN_INT_LONGLONG,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_POW,
|
|
|
|
"__builtin_pow",
|
|
|
|
BT_FN_DOUBLE_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_POWF,
|
|
|
|
"__builtin_powf",
|
|
|
|
BT_FN_FLOAT_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_POWL,
|
|
|
|
"__builtin_powl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
|
2001-12-04 01:50:35 +01:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_PREFETCH,
|
|
|
|
"__builtin_prefetch",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_CONST_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
builtins.def (BUILT_IN_PRINTF, [...]): Changed from front-end builtins to normal builtins, using DEF_LIB_BUILTIN.
* builtins.def (BUILT_IN_PRINTF, BUILT_IN_FPRINTF): Changed from
front-end builtins to normal builtins, using DEF_LIB_BUILTIN.
(BUILT_IN_PRINTF_UNLOCKED, BUILT_IN_FPRINTF_UNLOCKED): Changed
from front-end to normal builtins, using DEF_EXT_LIB_BUILTIN.
(DEF_FRONT_END_LIB_BUILTIN): Delete.
(DEF_EXT_FRONT_END_LIB_BUILTIN): Delete.
(BUILT_IN_FWRITE_UNLOCKED): Wrap long line.
* builtins.c (build_string_literal): New function to construct
a char* pointer to a string literal.
(expand_builtin_fputs): Change 2nd argument from "int ignore" to
"rtx target" to be consistent with other expand_builtin_* functions.
Change 3rd argument from "int unlocked" to "bool unlocked".
(expand_builtin_printf): Rewrite of c_expand_builtin_printf from
c-common.c to avoid front-end dependencies. Optimize printf("")
as a no-op when the result isn't required. Handle embedded NULs
in format string.
(expand_builtin_fprintf): A rewrite of c_expand_builtin_fprintf
from c-common.c to avoid front-end dependencies. Likewise, optimize
fprintf(fp,"") as a no-op when the result isn't required, evaluating
fp for side-effects. Handle embedded NULs in format string.
(expand_builtin_sprintf): Fix typo.
(expand_builtin): Don't expand BUILT_IN_FPRINT{,_UNLOCKED} when not
optimizing. Adjust calls of expand_builtin_fputs to match the API
change. Expand BUILT_IN_PRINTF and BUILT_IN_PRINTF_UNLOCKED using
expand_builtin_printf. Likewise, expand BUILT_IN_FPRINTF_UNLOCKED
and BUILT_IN_FPRINTF using expand_builtin_fprintf.
* c-common.c (is_valid_printf_arglist): Delete.
(c_expand_builtin): Delete.
(c_expand_builtin_printf): Moved to builtins.c. Delete.
(c_expand_builtin_fprintf): Moved to builtins.c. Delete.
(c_expand_expr): No longer treat CALL_EXPRs specially.
(CALLED_AS_BUILT_IN): Delete.
From-SVN: r69760
2003-07-24 23:04:12 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_PRINTF,
|
|
|
|
"__builtin_printf",
|
|
|
|
BT_FN_INT_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_1_2)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED,
|
|
|
|
"__builtin_printf_unlocked",
|
|
|
|
BT_FN_INT_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_1_2)
|
|
|
|
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_PUTCHAR,
|
|
|
|
"__builtin_putchar",
|
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED,
|
|
|
|
"__builtin_putchar_unlocked",
|
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_NOTHROW_LIST)
|
|
|
|
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_PUTS,
|
|
|
|
"__builtin_puts",
|
|
|
|
BT_FN_INT_CONST_STRING,
|
builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, [...]): Renamed from ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
gcc:
* builtin-attrs.def (ATTR_NOTHROW_NONNULL_1,
ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from
ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3.
(ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4,
ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1,
ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1):
New.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument.
(BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment
(BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY,
BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET,
BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY,
BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN,
BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN,
BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN,
BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF,
BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS,
BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED,
BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED,
BUILT_IN_STRDUP): Add "nonnull" attribute.
testsuite:
* gcc.dg/nonnull-3.c: New test.
From-SVN: r66468
2003-05-05 00:18:17 +02:00
|
|
|
ATTR_NOTHROW_NONNULL_1)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_PUTS_UNLOCKED,
|
|
|
|
"__builtin_puts_unlocked",
|
|
|
|
BT_FN_INT_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_NONNULL_1)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_RETURN,
|
|
|
|
"__builtin_return",
|
|
|
|
BT_FN_VOID_PTR,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS,
|
|
|
|
"__builtin_return_address",
|
|
|
|
BT_FN_PTR_UNSIGNED,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX,
|
|
|
|
"__builtin_rindex",
|
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_ROUND,
|
|
|
|
"__builtin_round",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_ROUNDF,
|
|
|
|
"__builtin_roundf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_ROUNDL,
|
|
|
|
"__builtin_roundl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS,
|
|
|
|
"__builtin_saveregs",
|
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SCANF,
|
|
|
|
"__builtin_scanf",
|
|
|
|
BT_FN_INT_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_SCANF_1_2)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_SETJMP,
|
|
|
|
"__builtin_setjmp",
|
|
|
|
BT_FN_INT_PTR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SIN,
|
|
|
|
"__builtin_sin",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_SINF,
|
|
|
|
"__builtin_sinf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_SINL,
|
|
|
|
"__builtin_sinl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_SNPRINTF,
|
|
|
|
"__builtin_snprintf",
|
|
|
|
BT_FN_INT_STRING_SIZE_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_3_4)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SPRINTF,
|
|
|
|
"__builtin_sprintf",
|
|
|
|
BT_FN_INT_STRING_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_2_3)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SSCANF,
|
|
|
|
"__builtin_sscanf",
|
|
|
|
BT_FN_INT_CONST_STRING_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_SCANF_2_3)
|
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, /* backward compat */
|
|
|
|
"__builtin_stdarg_start",
|
|
|
|
BT_FN_VOID_VALIST_REF_VAR,
|
|
|
|
ATTR_NULL)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_STPCPY,
|
|
|
|
"__builtin_stpcpy",
|
|
|
|
BT_FN_STRING_STRING_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCAT,
|
|
|
|
"__builtin_strcat",
|
|
|
|
BT_FN_STRING_STRING_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCHR,
|
|
|
|
"__builtin_strchr",
|
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCMP,
|
|
|
|
"__builtin_strcmp",
|
|
|
|
BT_FN_INT_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCPY,
|
|
|
|
"__builtin_strcpy",
|
|
|
|
BT_FN_STRING_STRING_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCSPN,
|
|
|
|
"__builtin_strcspn",
|
|
|
|
BT_FN_SIZE_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_STRDUP,
|
|
|
|
"__builtin_strdup",
|
|
|
|
BT_FN_STRING_CONST_STRING,
|
|
|
|
ATTR_MALLOC_NOTHROW_NONNULL_1)
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRLEN,
|
|
|
|
"__builtin_strlen",
|
|
|
|
BT_FN_SIZE_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1)
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRNCAT,
|
|
|
|
"__builtin_strncat",
|
|
|
|
BT_FN_STRING_STRING_CONST_STRING_SIZE,
|
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRNCMP,
|
|
|
|
"__builtin_strncmp",
|
|
|
|
BT_FN_INT_CONST_STRING_CONST_STRING_SIZE,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRNCPY,
|
|
|
|
"__builtin_strncpy",
|
|
|
|
BT_FN_STRING_STRING_CONST_STRING_SIZE,
|
2003-07-26 15:27:20 +02:00
|
|
|
ATTR_NOTHROW_NONNULL_1_2)
|
2000-09-12 17:10:50 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRPBRK,
|
|
|
|
"__builtin_strpbrk",
|
|
|
|
BT_FN_STRING_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
2001-12-21 03:36:37 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRRCHR,
|
|
|
|
"__builtin_strrchr",
|
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRSPN,
|
|
|
|
"__builtin_strspn",
|
|
|
|
BT_FN_SIZE_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRSTR,
|
|
|
|
"__builtin_strstr",
|
|
|
|
BT_FN_STRING_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_NONNULL_1_2)
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SQRT,
|
|
|
|
"__builtin_sqrt",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_SQRTF,
|
|
|
|
"__builtin_sqrtf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
re PR c++/9367 (error: nonnull argument with extern "C" snprintf prototype)
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.
From-SVN: r63650
2003-03-02 02:34:34 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_SQRTL,
|
|
|
|
"__builtin_sqrtl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-12-21 03:36:37 +01:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_TAN,
|
|
|
|
"__builtin_tan",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_TANF,
|
|
|
|
"__builtin_tanf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_C90RES_BUILTIN(BUILT_IN_TANL,
|
|
|
|
"__builtin_tanl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2003-07-31 05:16:24 +02:00
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_TRAP,
|
|
|
|
"__builtin_trap",
|
|
|
|
BT_FN_VOID,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_TRUNC,
|
|
|
|
"__builtin_trunc",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
2002-07-28 07:34:04 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_TRUNCF,
|
|
|
|
"__builtin_truncf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
2002-07-28 07:34:04 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_TRUNCL,
|
|
|
|
"__builtin_truncl",
|
2003-08-01 04:11:17 +02:00
|
|
|
BT_FN_LONGDOUBLE_LONGDOUBLE,
|
2002-07-28 07:34:04 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT,
|
|
|
|
"__builtin_unwind_init",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_VA_COPY,
|
|
|
|
"__builtin_va_copy",
|
|
|
|
BT_FN_VOID_VALIST_REF_VALIST_ARG,
|
2002-07-28 07:34:04 +02:00
|
|
|
ATTR_NULL)
|
2003-07-31 05:16:24 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_VA_END,
|
|
|
|
"__builtin_va_end",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_VALIST_REF,
|
|
|
|
ATTR_NULL)
|
varargs.h: Replace with stub which issues #error.
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed
__builtin_va_start.
* builtins.def (BUILT_IN_VARARGS_START): Delete.
(BUILT_IN_VA_START): New.
* builtins.c (expand_builtin_va_start): Eliminate first
argument and code to implement pre-ISO varargs.
(std_expand_builtin_va_start): Ignore first argument; it is
always 1.
(expand_builtin): Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* function.c (assign_parms): Delete hide_last_arg and all
its uses.
(mark_varargs): Delete function.
* function.h (struct function): Delete 'varargs' bit.
(current_function_varargs): Delete macro.
* tree.h: Don't declare mark_varargs.
* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
(c_expand_body): Don't call mark_varargs.
* c-objc-common.c: Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* c-tree.h: Don't declare c_mark_varargs.
* c-parse.in: Remove grammar rules for '&...' (which has been
commented out since before 2.7.2) and for '...' in K+R
argument declarations.
* builtins.c, function.c, integrate.c, sibcall.c,
config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16.c: Delete all references to
current_function_varargs, and code predicated on that flag.
* config/alpha/alpha.c (alpha_va_start),
config/arc/arc.c (arc_va_start),
config/i386/i386.c (ix86_va_start),
config/mips/mips.c (mips_va_start),
config/mn10300/mn10300.c (mn10300_va_start),
config/rs6000/rs6000.c (rs6000_va_start),
config/s390/s390.c (s390_va_start),
config/sh/sh.c (sh_va_start),
Ignore first argument; it is always 1.
* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start.
* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
Delete m68hc11_va_start.
* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
No need to define EXPAND_BUILTIN_VA_START.
* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
doc/trouble.texi: Remove references to GCC-provided <varargs.h>.
testsuite:
* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
Convert to use <stdarg.h>.
* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
Delete.
* gcc.dg/va-arg-2.c: New.
* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.
From-SVN: r55472
2002-07-16 04:16:47 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_VA_START,
|
|
|
|
"__builtin_va_start",
|
|
|
|
BT_FN_VOID_VALIST_REF_VAR,
|
2002-07-28 07:34:04 +02:00
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_VPRINTF,
|
|
|
|
"__builtin_vprintf",
|
|
|
|
BT_FN_INT_CONST_STRING_VALIST_ARG,
|
|
|
|
ATTR_FORMAT_PRINTF_1_0)
|
2002-07-06 02:16:44 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_VSCANF,
|
|
|
|
"__builtin_vscanf",
|
|
|
|
BT_FN_INT_CONST_STRING_VALIST_ARG,
|
|
|
|
ATTR_FORMAT_SCANF_1_0)
|
2003-04-14 04:55:31 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_C99_BUILTIN(BUILT_IN_VSNPRINTF,
|
|
|
|
"__builtin_vsnprintf",
|
|
|
|
BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG,
|
|
|
|
ATTR_FORMAT_PRINTF_3_0)
|
2003-04-14 04:55:31 +02:00
|
|
|
|
2003-07-31 05:16:24 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_VSPRINTF,
|
|
|
|
"__builtin_vsprintf",
|
|
|
|
BT_FN_INT_STRING_CONST_STRING_VALIST_ARG,
|
|
|
|
ATTR_FORMAT_PRINTF_2_0)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_VSSCANF,
|
|
|
|
"__builtin_vsscanf",
|
|
|
|
BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG,
|
|
|
|
ATTR_FORMAT_SCANF_2_0)
|
2003-04-14 04:55:31 +02:00
|
|
|
|