Problem with functions not being inlined
Andres Tiraboschi
andres.tiraboschi@tallertechnologies.com
Mon Mar 2 19:35:00 GMT 2015
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?
More information about the Gcc-help
mailing list