This is the mail archive of the gcc-bugs@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: Use of atexit for destructors on Solaris 7.




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


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