| To: | Daniel Jacobowitz <dan@debian.org> |
|---|---|
| Subject: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers |
| From: | Jim Paris <jim@jtan.com> |
| Date: | Fri, 7 Dec 2001 13:04:33 -0500 |
| Cc: | Geert Uytterhoeven <geert@linux-m68k.org>, "Bradley D. LaRonde" <brad@ltc.com>, Ralf Baechle <ralf@oss.sgi.com>, Linux/MIPS Development <linux-mips@oss.sgi.com> |
| In-reply-to: | <20011207123833.A23784@nevyn.them.org>; from dan@debian.org on Fri, Dec 07, 2001 at 12:38:33PM -0500 |
| References: | <20011207121416.A9583@dev1.ltc.com> <Pine.GSO.4.21.0112071830000.29896-100000@mullein.sonytel.be> <20011207123833.A23784@nevyn.them.org> |
| Reply-to: | jim@jtan.com |
| Sender: | owner-linux-mips@oss.sgi.com |
| User-agent: | Mutt/1.2.5i |
> > > #define set_io_port_base(base) \
> > > - do { * (unsigned long *) &mips_io_port_base = (base); } while (0)
> > > + *(unsigned long *)&mips_io_port_base = (base);
>
> If Bradley loses the extra semicolon, what other problem is the
> do/while construct supposed to address? I seem to recall there being
> another problem case, but I can't remember what it is.
For that particular #define, I can't think of any problem cases. The
do/while helps with multiple statements, gives you a new scope for
variable declaration, and allows the code to do a break, but we don't
need any of that here.
-jim
|
| Previous by Date: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Daniel Jacobowitz |
|---|---|
| Next by Date: | .section problems in entry.S, Kip Walker |
| Previous by Thread: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Daniel Jacobowitz |
| Next by Thread: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |