This is the mail archive of the gcc@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]

Re: Fwd: error in variable dereferencing


Thibaud GUERIN writes:
 > hi,
 > I'm actually writing a program in C and i'm fighting with an address
 > dereferencing since some days now.
 > 
 > int            the_bug(const char *fmt, ...)
 > {
 >   char    **ap;
 >   char        **s = (char **)(&fmt);
 > 
 > /* __asm__ volatile ( */
 > /*           "\tleal %1, %%eax\n" */
 > /*           "\tmovl %%eax,%0\n" */
 > /*           "\tmovl %1, %%eax\n" */
 > /*           "\tmovl %2, %%ebx \n" */
 > /*           "\tmovl %%eax, (%%ebx)\n" */
 > /*           : "=m"(ap) : "m" (fmt), "m"(ap)); */

This is wrong in so many ways I don't know where to start.

It may be better if you try to tell us what you are trying to do.

Redirecting gcc-help@gcc.gnu.org.

Andrew.


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