This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: C++ PATCH: cleanup DEBUG_BINDING_LEVELS code


Mark Mitchell <mark@codesourcery.com> writes:

| >   While working on the name-lookup performance issue, I came to turn
| > on DEBUG_BINDING_LEVELS and realize that nobody has been turning it on
| > for some while.  This patch (which was dormant in my local tree)
| > cleans up the DEBUG_BINDING_LEVELS code  so as to make it bootstrap
| > again with the -Werror option.  
| 
| Why can't we just use this idiom:
| 
|   #ifndef DEBUG_BINDING_LEVELS
|   #define DEBUG_BINDING_LEVELS 0
|   #else
|   #define DEBUG_BINDING_LEVELS 1
|   #endif
| 
|   ...
| 
|   if (DEBUG_BINDING_LEVELS) { 
|   ...
|   }
| 
| Why do we need another macro?

consistency with ENABLE_CHEKING, ENABLE_RTL_CHECKING,
ENABLE_GC_CHECKING, ENABLE_VALGRIND_CHECKING as found in the rest of
the compiler.  But I do not feel strongly about it.

-- Gaby


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