This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Builtins in `std'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]