Re: forcing a variable to be on the stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/06/2010 04:20 PM, Andrew Haley wrote:
> On 10/06/2010 04:11 PM, Mathieu Lacage wrote:
>> Is there a way to ask gcc to force a specific variable to be stored on
>> the stack ?
> 
> Take its address.
> 
>> (other than write a bit of inline asm ?)
> 
> Nothing wrong with that:
> 
>  asm volatile ("" ::"a"&foo);

Sheesh.

asm volatile ("" ::"r"(&foo));



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux