This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fwd: error in variable dereferencing
- From: Andrew Haley <aph at gcc dot gnu dot org>
- To: "Thibaud GUERIN" <thibaud at ploposor dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 20 Apr 2006 15:14:20 +0100
- Subject: Re: Fwd: error in variable dereferencing
- References: <96d59a150604200353h6249fa1fr8a93d20baff37fc5@mail.gmail.com> <96d59a150604200657m53252a12t601302ec580f44b7@mail.gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
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.