This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Use of atexit for destructors on Solaris 7.
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: Use of atexit for destructors on Solaris 7.
- From: Phil Edwards <pedwards at jaj dot com>
- Date: Tue, 21 Mar 2000 17:13:10 -0500
- Cc: c dot galambos at eim dot surrey dot ac dot uk
Ross Smith writes:
> That limit applies to atexit() functions, not destructors. The standard
> doesn't give an implementation any licence to ignore destructors. If
> there is a fixed upper limit on atexit() functions on a system, then it
> follows that no compiler on that system is allowed to use atexit() for
> destructors.
Ah, I see the problem now. As Mike Stump says, compilers will have
limits, but I didn't think this was one of them for gcc. I suppose
the installation could grab ATEXIT_MAX out of <limits.h> and write out
atexit() if the number is less than some threshold value (1024?).
> I don't currently have a Solaris box to test on, so I can't check
> Charles's report. Can anyone confirm or deny it?
I confirm it. Solaris 7, gcc 2.95.2. Bummer.
Phil