public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* NDEBUG-like macro
@ 1998-04-15 15:09 Mark Mitchell
  1998-04-16  0:54 ` Martin von Loewis
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mark Mitchell @ 1998-04-15 15:09 UTC (permalink / raw)
  To: egcs

Folks --

  In private email, Jeff and I have been discussing the following
  proposal:

  o Add a configuration option --enable-checking to enable additional,
    possibly costly, consistency checks in the compiler.

  o This option would cause the definition of the macro ENABLE_CHECKING
    throughout compilation of the compiler.

  o Then, we could add checks in the compiler that are only enabled
    if ENABLE_CHECKING.

  The motivation for this is the disturbingly common situation in
which I find that bugs are triggered by using, say, DECL_INITIAL on a
tree node that is not a DECL.  In general, the use of a macro that
pulls something out of a tagged union when the tag doesn't match.  It
would be nice if we could blow up when we did this wrong.
Unfortunately, checking this everywhere will be quite costly; so much
so that we should not do it when a normal user is using the compiler.
Hence the need for a compile-time option.

  Jeff said:

> I'm got no particular problem with this, though I'd like to see
> it at least mentioned on the list so that Jim, Jason, etc can
> comment. 

  So, comment away!

-- 
Mark Mitchell <mmitchell@usa.net>
http://home.earthlink.net/~mbmitchell
Consulting Services Available

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: NDEBUG-like macro
@ 1998-04-16 13:53 Mike Stump
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Stump @ 1998-04-16 13:53 UTC (permalink / raw)
  To: egcs, mmitchell

I kinda like it...

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-04-17 19:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-15 15:09 NDEBUG-like macro Mark Mitchell
1998-04-16  0:54 ` Martin von Loewis
1998-04-16  1:44 ` Bernd Schmidt
1998-04-16 22:46   ` Jeffrey A Law
1998-04-17 19:41 ` Jim Wilson
1998-04-16 13:53 Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).