Article View: gnu.gcc.bug
Article #876Ansi functions, built in functions.
From: ian
Date: Mon, 15 Jan 1990 11:59
Date: Mon, 15 Jan 1990 11:59
32 lines
1742 bytes
1742 bytes
Since the mem{set,cpy,mv,cmp} etc functions are ansi standards isn't
it about time we started using them in preference to b{copy,zero} etc?
On a different tack, the gcc documentation seems very sparce on
builtin functions. I found out from an oblique reference to alloca
being built in. I then grepped through everything until I found out
what to define to what and now I use I use __builtin_alloca for all
the GNU stuff that needs alloca. As a consequence (of all that
grepping) I also discovered that there is a whole swag of other
__builtin_... functions, none of which are defined in the
documentation.
How about raising the profile of __builtin_... functions in the
documentation? Also __builtin_alloca doesn't necessarilly work for all
implimentations (as distributed, the ns32k based ports do not
impliment __builtin_alloca properly at least), so code which does
#ifdef __GNUC__
#define alloca __builtin_alloca
#endif
isn't always right. Are there other builtin functions which mightn't
always work? It might seem that a GCC builtin.h include file could be
warranted so that you can do
#ifdef __GNUC__
#include <builtins.h>
#endif
Then if a particular implimentation can't impliment a particular
builtin function, it is left undefined in the include file and the
conventional library function will be used.
Technical Details
Message-ID:
<9001151534.23275@munnari.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!sibyl.eleceng.ua.oz.au!ianShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!sibyl.eleceng.ua.oz.au!ian From: ian@sibyl.eleceng.ua.oz.au Newsgroups: gnu.gcc.bug Subject: Ansi functions, built in functions. Message-ID: <9001151534.23275@munnari.oz.au> Date: 15 Jan 90 11:59:25 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 32