Builtins in `std'
Joseph S. Myers
jsm28@cam.ac.uk
Wed May 23 00:36:00 GMT 2001
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
jsm28@cam.ac.uk
More information about the Gcc
mailing list