comp.lang.ada
 help / color / mirror / Atom feed
From: Luke A. Guest <laguest@archeia.com>
Subject: Re: Any Suggestion How To Accomplish A Debug Macro?
Date: Wed, 31 Dec 2014 00:15:47 +0000 (UTC)
Date: 2014-12-31T00:15:47+00:00	[thread overview]
Message-ID: <1238045055441677541.132126laguest-archeia.com@nntp.aioe.org> (raw)
In-Reply-To: gCDow.832901$No4.618024@fx19.iad

Brad Moore <brad.moore@shaw.ca> wrote:
> On 14-12-30 04:14 AM, Simon Wright wrote:
>> Hubert <herrdoktor@fumanchu.com> writes:

> This works in GNAT, and might work in other compilers as well. Worst case
> is that the Debug_Enabled boolean get evaluated in multiple places, but
> that overhead of evaluating a Boolean might still be acceptable for a
> compiler that doesn't do dead code elimination.

Not strictly true as the compiler should see the "if var = true then" and
remove the if in dead code elimination leaving the contents of the if
statement. When the if statement is false (statically) the entire statement
can be eliminated.


  parent reply	other threads:[~2014-12-31  0:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30  3:12 Any Suggestion How To Accomplish A Debug Macro? Hubert
2014-12-30 11:14 ` Simon Wright
2014-12-30 11:45   ` Hubert
2014-12-30 20:07   ` Brad Moore
2014-12-30 22:11     ` Randy Brukardt
2015-01-01 12:28       ` Georg Bauhaus
2015-01-02 20:37       ` J-P. Rosen
2015-01-02 21:13         ` Dmitry A. Kazakov
2015-01-02 21:52           ` Randy Brukardt
2015-01-02 22:17             ` Niklas Holsti
2014-12-31  0:15     ` Luke A. Guest [this message]
2014-12-30 16:24 ` sbelmont700
2014-12-30 18:21   ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox