From: Richard Henderson <rth@twiddle.net>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
jakub@redhat.com, szepe@pinerecords.com, jamagallon@able.es,
kwall@kurtwerks.com, lcapitulino@prefeitura.sp.gov.br,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: 2.6-test2: gcc-3.3.1 warning.
Date: Sat, 16 Aug 2003 18:25:51 -0700 [thread overview]
Message-ID: <20030817012551.GB22022@twiddle.net> (raw)
In-Reply-To: <20030729083507.3dd20485.rddunlap@osdl.org>
On Tue, Jul 29, 2003 at 08:35:07AM -0700, Randy.Dunlap wrote:
> I really hate to get this back to the original problem, but is
> the reported warning a gcc 3.3.x problem? I don't see the assembly
> problem here.
>
> | arch/i386/kernel/reboot.c: In function `machine_restart':
> | arch/i386/kernel/reboot.c:261: warning: use of memory input without
> | lvalue in asm operand 0 is deprecated
static long no_idt[2];
...
__asm__ __volatile__("lidt %0": :"m" (no_idt));
Notice that no_idt is an array. Therefore its identifier decays
into a pointer. Therefore, what this statement is really asking
for is
{
long *tmp = no_idt;
asm volatile ("lidt %0" : : "m" (*&tmp));
}
which is clearly not what was intended.
Fixed by doing
__asm__ __volatile__("lidt %0": :"m" (*no_idt));
r~
next prev parent reply other threads:[~2003-08-17 1:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-28 12:40 2.6-test2: gcc-3.3.1 warning Luiz Capitulino
2003-07-28 20:29 ` Randy.Dunlap
2003-07-28 22:50 ` Tomas Szepe
2003-07-29 0:22 ` Kurt Wall
2003-07-29 4:55 ` Tomas Szepe
2003-07-29 9:28 ` J.A. Magallon
2003-07-29 9:35 ` Tomas Szepe
2003-07-29 9:48 ` J.A. Magallon
2003-07-29 9:58 ` Tomas Szepe
2003-07-29 10:11 ` J.A. Magallon
2003-07-29 10:20 ` Tomas Szepe
2003-07-29 11:57 ` Alan Cox
2003-07-29 15:35 ` Randy.Dunlap
2003-08-17 1:25 ` Richard Henderson [this message]
2003-08-17 1:34 ` Linus Torvalds
2003-08-17 2:04 ` Randy.Dunlap
2003-07-29 12:34 ` Jakub Jelinek
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=20030817012551.GB22022@twiddle.net \
--to=rth@twiddle.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jakub@redhat.com \
--cc=jamagallon@able.es \
--cc=kwall@kurtwerks.com \
--cc=lcapitulino@prefeitura.sp.gov.br \
--cc=linux-kernel@vger.kernel.org \
--cc=rddunlap@osdl.org \
--cc=szepe@pinerecords.com \
--cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).