This is the mail archive of the
mailing list for the GCC project.
Re: Builtins in `std'
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Builtins in `std'
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Wed, 23 May 2001 08:36:31 +0100 (BST)
- cc: <gcc at gcc dot gnu dot org>, Jason Merrill <jason at cygnus dot com>, Benjamin Kosnik <bkoz at nabi dot net>, Gabriel Dos Reis <gdr at codesourcery dot com>, Nathan Sidwell <nathan at codesourcery dot com>
On Tue, 22 May 2001, Mark Mitchell wrote:
> At startup, we push lots of builtins into `std'. For example, we do:
I think the way declarations of builtins, other than the __builtin
versions, work, is wrong for both C and C++. Instead of predeclaring
them, we should look, when the user's program declares (through a standard
header, explicitly or implicitly) a function that might be builtin, for a
builtin of that name and compatible type, and use it if appropriate. If
the builtin is of a name reserved by the standard but the type is
incompatible, we should warn and discard the builtin; if it is a
non-standard builtin, we should discard it silently.
The same mechanism should also apply for attributes applied to functions
by default - both the noreturn attributes presently applied by
NOT_BUILT_IN builtins, and format attributes, and so on.
However, I'm not volunteering to implement this.
Joseph S. Myers