This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Builtins and C++ and such
- From: Jason Merrill <jason at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>, roger at eyesopen dot com,jsm28 at cam dot ac dot uk
- Cc: gcc at gcc dot gnu dot org, bkoz at redhat dot com,Jason Merrill <jason at redhat dot com>
- Date: Tue, 19 Mar 2002 22:53:46 +0000
- Subject: Re: Builtins and C++ and such
- References: <51660000.1016573597@gandalf.codesourcery.com>
I think special gunk in the compiler is necessary; the question is what
form that gunk should take. Besides your new idea of handling it at expand
time, I've previously talked about expanding the nothrow_libfn_p code to
cover builtin-ness as well as nothrow-ness.
Roger Sayle has talked about yet another scheme, esentially the current
predeclaration strategy, but using DECL_ANTICIPATED_P to determine whether
or not a decl is visible to normal lookup; see the threads starting with
http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01628.html
http://gcc.gnu.org/ml/gcc-patches/2001-12/msg00297.html
More simply, the three differ in when the lookup is done and the attributes
are applied: at startup, at the declaration, or at the call.
I'm still partial to my own scheme; a builtin doesn't exist in the symbol
table until a matching function is declared, and then the information is
available in the DECL for as many calls as desired.
Jason