mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eyal Lebedinsky <eyal@eyal.emu.id.au>
To: Mike Fedyk <mfedyk@matchmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error
Date: Sun, 05 May 2002 17:33:32 +1000	[thread overview]
Message-ID: <3CD4E04C.33E9518@eyal.emu.id.au> (raw)
In-Reply-To: <20020503203738.E1396@dualathlon.random> <3CD328C5.2C6D389A@eyal.emu.id.au> <20020505010804.GB2392@matchmail.com>

Mike Fedyk wrote:
> 
> On Sat, May 04, 2002 at 10:18:13AM +1000, Eyal Lebedinsky wrote:
> > Andrea Arcangeli wrote:
> > >
> > > Full patchkit:
> > > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> >
> > linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build,
> > a declaration is put in an illegal place.
> >
> 
> Why is it illegal to put that before the ifdef instead of after?

In standard C, declarations must precede statements in a block. When the
#if is true, the declaration is exposed, and it is after an assignment,
a syntax error.

The most general solution is to always open a new block if you need a
declaration, but here the code fragment is small enough to not do so
(but one needs to be alert).

#if ...
{
	int	x;
	x = ...
}
#endif


--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

  reply	other threads:[~2002-05-05  7:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-03 18:37 2.4.19pre8aa1 & vm-34 Andrea Arcangeli
2002-05-04  0:18 ` 2.4.19pre8aa1 & vm-34: zftape-init.c compile error Eyal Lebedinsky
2002-05-05  1:08   ` Mike Fedyk
2002-05-05  7:33     ` Eyal Lebedinsky [this message]
2002-05-04  0:24 ` 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure Eyal Lebedinsky
2002-05-04  7:09   ` Andrea Arcangeli
2002-05-04 11:44     ` Andrea Arcangeli
2002-05-04  0:54 ` 2.4.19pre8aa1 & vm-34: 8253xutl.c compile error Eyal Lebedinsky
2002-05-04  1:30 ` 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable Eyal Lebedinsky
2002-05-04  7:25   ` Andrea Arcangeli
2002-05-04 13:41     ` Eyal Lebedinsky
2002-05-04 13:49       ` Andrea Arcangeli
2002-05-05  0:26         ` Eyal Lebedinsky

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=3CD4E04C.33E9518@eyal.emu.id.au \
    --to=eyal@eyal.emu.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfedyk@matchmail.com \
    /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®