[fpc-devel] Declare variables inside the code
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed May 11 15:48:03 CEST 2011
On 11 May 2011, at 15:22, Joerg Schuelke wrote:
> Would not it be helpful to leave the debugging code in the source, and
> let him vanish through a conditional define?
The compiler has such code, between {$ifdef EXTDEBUG}. Having full-
fledged macro support would not really make most of that code simpler,
because there are few if any general patterns that appear in many
places (and such patterns, at least those in the compiler, could just
as easily be isolated into functions if refactoring were required).
Furthermore, most debugging code is always enabled because it's much
easier for a user to figure out that something is wrong when the
compiler halts with "internalerror 89" instead of silently generating
wrong code.
Note: again, I'm only talking about the compiler sources.
Jonas
More information about the fpc-devel
mailing list