This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Problem with functions not being inlined


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]