Problem with functions not being inlined

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

 



hi,
I'm compiling the next simple example:

---------------------------------------------------------
#include <iostream>

struct PP
{
    inline void wInline();
};

inline void PP::wInline()
{
    std::cout << "hola" << std::endl;
}

int main()
{
    PP pp;
    pp.wInline();
    return 0;
}
---------------------------------------------------------
in this way:

g++ -O0 -finline-functions -finline-functions-called-once
-finline-small-functions -Wall -Wextra -pedantic -std=c++11 -Winline
main.cpp

with gcc 4.8.2.


Are the -finline-functions, -finline-functions-called-once and
-finline-small-functions flags enough?
Why am I having no warnings even with the -Winline flag enabled?




[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