This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15306] Spurious "use of memory input without lvalue" warning
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 May 2004 12:55:50 -0000
- Subject: [Bug c/15306] Spurious "use of memory input without lvalue" warning
- References: <20040506051145.15306.pgonzalez@bluel.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-06 12:55 -------
A better way is have a tempary const variable holding the function address: which works by the way:
void exampleFunction() {
}
const void (*temp) () = exampleFunction;
__attribute__((naked))
void thunk() {
asm volatile(
" stmfd sp!, {r0, r1, r2, r3, ip, lr, pc}\n"
" ldr r1, %0\n"
" b overlayLoader\n"
: : "m"(temp) : "cc"
);
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15306