All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoann Padioleau <padator@wanadoo.fr>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] What do "#if 1" and "#if 0" do?
Date: Wed, 28 Mar 2007 07:54:43 +0000	[thread overview]
Message-ID: <87ejn9n6po.fsf@wanadoo.fr> (raw)
In-Reply-To: <e57070790703280024t4df3694cu8babcd12053779eb@mail.gmail.com>

Matthias Kaehlcke <matthias.kaehlcke@gmail.com> writes:

> El Wed, Mar 28, 2007 at 07:24:35AM +0000 Guanqun Lu ha dit:
>
>> I found the webpage:
>> http://fsdev.net/wiki/index.php?title=If_0_or_if_1_directives
>> And I'm just wondering what do the two directives do.
>
> my interpretation is that they are used for activating (#if 1) and
> deactivating (#if 0) code.

We often use #if 0 ... #endif for commenting a big region of code.
One might think that we could also use /* ... */ but if what is in the middle
contain some C comments, then you can not, because C does not
handle nested comments.

>
> m.
>
> -- 
>               Insanity: doing the same thing over and over
>                 again and expecting different results
>                             (Albert Einstein)
>                                                                  .''`.
>     using free software / Debian GNU/Linux | http://debian.org  : :'  :
>                                                                 `. `'`
> gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2007-03-28  7:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28  7:24 [KJ] What do "#if 1" and "#if 0" do? Guanqun Lu
2007-03-28  7:47 ` Matthias Kaehlcke
2007-03-28  7:54 ` Yoann Padioleau [this message]
2007-03-28  8:28 ` Guanqun Lu
2007-03-28 12:50 ` Robert P. J. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ejn9n6po.fsf@wanadoo.fr \
    --to=padator@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.