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]
Other format: [Raw text]

Re: Standard scheme for maintainer-only debugging code?


> Of course, there's a way to achieve both: debug_XYZ could be defined to
> any of 0, 1, or flag_debug_XYZ, and there could be a single #ifdef to
> make all of the flags variable.

Perhaps enabled with --enable-maintainer-mode?

I.e. default to being compiled out, but with --enable-maintainer-mode
it becomes a runtime test?

We could end up with code like:

	if (DEBUGFLAG(foo))
	  {
          }


where DEBUGFLAG(foo) is either zero or expands to some runtime test
(array of flag bits, table of given options, #defines, whatever).


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