This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/15306] Spurious "use of memory input without lvalue" warning


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]