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

Re: x86 PIC regressions


On Sat, Sep 19, 1998 at 05:06:41PM +1000, Geoffrey KEATING wrote:
> int a = 0;
> int b = 0;
> 
> void foo(void)
> {
>   asm (".long %1-%0" : : "i"(&a), "i"(&b));
> }

That still isn't constant.  If we're PIC, we have to either a or
b or both could be overridden.  Make them static and the example
works, but it isn't something that I would worry about too much.


r~


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