Re: pragma GCC optimize prevents inlining

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

 



On Thu, Jan 04, 2024 at 03:51:23PM +0100, David Brown via Gcc-help wrote:
> This is a general limitation in GCC, as far as I know.  I have come 
> across it myself (in my case it was the "-fwrapv" flag).  As far as I 
> remember from a previous discussion long ago, there is no easy workaround.

What are the expected semantics?  That depends on the use case, so on
what the user expects.  If the compiler inlines the function and picks
either set of options, it may do something the user wanted to avoid.
Not good.

The user can always write exactly what the user wants, instead :-)

Maybe we could have an option -fallow-inlining-that-changes-semantics?
Not sure if people will actually find that useful, but at least they
cannot say they weren't warned if they use that ;-)


Segher



[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