From: Abdel <draconux@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: macro _set_base - "do - while(0)" question
Date: Wed, 2 Jan 2008 14:22:08 +0100 [thread overview]
Message-ID: <60d29d630801020522r737ea96cl7693567298d28aca@mail.gmail.com> (raw)
2008/1/2, DervishD <lkml@dervishd.net>:
> * Abdel <draconux@gmail.com> dixit:
> > In file include/asm-i386/system.h, _set_base and _set_limit use an
> > useless do ... while(0)
> >
> > Why is this needed ?
>
> Google for "do while swallow semicolon". This looks like an useless and
> weird construction but it is very useful when it comes to macros (you
> can define variables inside the block and you can use your macro as any
> other statement, it won't swallow the semicolon).
thanks to all for your responses :)
--
Abdel
http://draconux.free.fr/
next reply other threads:[~2008-01-02 13:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 13:22 Abdel [this message]
[not found] <9HagT-66H-21@gated-at.bofh.it>
2008-01-02 12:15 ` Bodo Eggert
-- strict thread matches above, loose matches on Subject: below --
2008-01-02 11:45 Abdel
2008-01-02 11:49 ` Sam Ravnborg
2008-01-02 12:42 ` DervishD
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=60d29d630801020522r737ea96cl7693567298d28aca@mail.gmail.com \
--to=draconux@gmail.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®