libverbose_terminate, pass 1 of N
Nathan Myers
ncm-nospam@cantrip.org
Sun Dec 22 17:01:00 GMT 2002
On Sun, Dec 22, 2002 at 05:34:16PM -0500, Phil Edwards wrote:
> On Fri, Dec 20, 2002 at 07:43:40PM -0800, Nathan Myers wrote:
> > Have we established that a verbose-termination-by-default would not
> > be conformant? Is there some other reason not to want it as the
> > default?
>
> Verbose termination calls fprintf, which can't be used in a freestanding
> environment. If -ffreestanding (or whatever it is) were to cause a macro
> to be defined, then I see no reason why we couldn't [act accordingly]
> ...
> The only note I can find in the standard is "default terminate() calls
> abort," which doesn't seem to preclude also doing other actions.
I missed the "free-standing" angle.
In a free-standing implementation, it is users who can't assume fprintf
is there. Implementers can use anything they choose to provide. Still,
fprintf seems pretty heavy-weight when ::write would suffice. Since we
provide source, actual users of free-standing Gcc can replace our
terminate handler with anything they like, so ISTM we don't really have
to do anything for them but stick a comment in the code.
Nathan Myers
ncm-nospam@cantrip.org
More information about the Libstdc++
mailing list