Disable calling convention optimization for local functions

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

 



Hello all,

I am using GCC 4.6.3 for i386.

I see that -O2 level optimizes the calling convention (can make it pretty
much arbitrary) for local static functions that are not visible outside the
compilation unit.  For various reasons, I would like to disable this, and
enforce C calling convention for all functions including static functions
local to just one source file.  What option (some -fno-XXX, say?) should I
specify to achieve my objective?

I do not want to get rid of -O2 altogether.  And I do not want to make my
static functions extern.

Note, I tried specifying __attribute__((cdecl)) for the local static
function (whose calling convention I wish to prevent from getting
optimized), but the optimization still happens.

Thanks,
Satyam Sharma



[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