This is the mail archive of the gcc@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] |
The macros IDENTIFIER_GLOBAL_VALUE and IDENTIFIER_NAMESPACE_VALUE call binding_for_name, which creates a new binding, if there is none. This is inefficient, since it creates new CPLUS_BINDINGs unnecessarily. Most uses of IDENTIFIER_GLOBAL_VALUE are in an rvalue context, where creating a new binding is useless. Worse, print_lang_identifier invokes IDENTIFIER_GLOBAL_VALUE. This means that calling debug_tree from the debugger may invoke make_node. This means that debugging cc1plus is no longer determinate, but the address of nodes depends on whatever previous nodes have been printed using debug_tree. That is why it is totally unacceptable for debug_tree to allocate any memory. (The only exception is buffers allocated by printf, which we cannot control, but at least normally only happens once.) --Per Bothner Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |