Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jun 1998 12:01:54 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        moncrg@ma.ultranet.com (Gregory D Moncreaff)
Cc:        mph@pobox.com, mike@smith.net.au, hackers@FreeBSD.ORG
Subject:   Re: Irritating cpp feature
Message-ID:  <199806071601.MAA13243@hda.hda.com>
In-Reply-To: <002301bd9225$f1527480$804106d1@micron> from Gregory D Moncreaff at "Jun 7, 98 11:07:07 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> you can put anything you want in an #if 0/#endif block.
> by definition, the preprocessor deletes such before the compiler
> (which is the only thing that checks code syntax)
> even sees it

Not true according to info gcc.  However, -traditional
works around it:

   * GNU CC complains about unterminated character constants inside of
     preprocessing conditionals that fail.  Some programs have English
     comments enclosed in conditionals that are guaranteed to fail; if
     these comments contain apostrophes, GNU CC will probably report an
     error.  For example, this code would produce an error:

          #if 0
          You can't expect this to work.
          #endif

     The best solution to such a problem is to put the text into an
     actual C comment delimited by `/*...*/'.  However, `-traditional'
     suppresses these error messages.

Peter

-- 
Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Safety critical systems, Agency approval

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806071601.MAA13243>