public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bitops cleanup 2/4
Date: Wed, 03 Apr 2002 14:48:08 +0200	[thread overview]
Message-ID: <jeit79dk3b.fsf@sykes.suse.de> (raw)
In-Reply-To: <E16sbHn-0005uY-00@wagner.rustcorp.com.au>

Rusty Russell <rusty@rustcorp.com.au> writes:

|> Linus, please apply (no object code changes).
|> 
|> The following are arrays:
|> 	boot_cpu_data.x86_capability
|> 	dev->bus->devmap.devicemap
|> 	tty->process_char_map
|> 
|> They don't need the & in front of them: "&array" is defined to be the
|> same as "array" (only reference I can find is the ANSI C "changes
|> since K&R" section).

Wrong.

|> For some reason, gcc (at least 2.95) gives a warning on these when
|> passed as unsigned long *.  I think this is a gcc bug...

gcc is correct.  "&array" and "array" are different.  While they represent
the same address, the types are not compatible.  Eg. for "int array[5]"
the type of "array" is "int [5]" (decaying to "int *" in most contexts),
but the type of "&array" is "int (*)[5]" (pointer to array of 5 ints).
And "(&array)[1]" is quite different from "(array)[1]".

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2002-04-03 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03  3:18 [PATCH] bitops cleanup 2/4 Rusty Russell
2002-04-03 12:48 ` Andreas Schwab [this message]
2002-04-04  2:02   ` Rusty Russell

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=jeit79dk3b.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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