This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with __cxa_demangle and the verbose terminate handler


I have always been in favor of using fputs here, instead of write. The
problem is that some people feel that fputs brings in too much of "C"
library.

Since we only use the verbose handler by default in hosted environments, that doesn't worry me much.


As I see it, the solutions are to:

1) use fputs
2) use fileno(stderr) to acertain the file descriptor of stderr, instead of 2

I suggest 1, and have a patch to do so ready.

Option 2 is not safe. If stderr has been closed, fileno may return the old file descriptor.


That's why I suggested (1).

Please check in your patch on 3.4 branch as well as on the mainline.

I'd also like to hear your opinion on the demangler issue.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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