This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c: static constructors and destructors
- From: Richard Henderson <rth at redhat dot com>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 27 Nov 2001 15:19:03 -0800
- Subject: Re: c: static constructors and destructors
- References: <20011127230207.A27671@daikokuya.demon.co.uk>
On Tue, Nov 27, 2001 at 11:02:07PM +0000, Neil Booth wrote:
> Is there any reason why this is C-specific, and not common to C and ObjC?
Or better, entirely language independant? No, not really.
FWIW, in the ideal casea front end would call the backend with
trees that it wished to have run as at startup/shutdown. For
C/ObjC this would be a CALL_EXPR of a function so marked; for
C++ this would be whatever constructor gook currently gets
shoved into the __static_constructor_mumble function.
But that pretty much has to wait until we have language
independant trees.
r~