Re: Compile error when not using -ftree-ter

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

 



Job Noorman <jobnoorman@xxxxxxxxx> writes:

>> ... it's just happenstance of how the compiler is written."
>
> No offense but I think that's a non-argument. You could use that to reject 
> any bug report.

No, I can't.  Here is the rule: when optimizing, you can use "i" if the
expression is known to reduce to a constant.  When not optimizing, the
behaviour is unspecified: it will either work correctly or fail noisily.
In other words, it just depends on how the compiler is written, and it
may change in different releases.


>> It's not a bug, because the compiler only promises to reduce an address to
>> match the "i" constraint when optimizing.
>
> Where does it promise that?

While asm constraints are under-documented, it's generally true that "r"
always works for a value that fits in a register, and for anything else
it depends.

Ian


[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