> On 03/02/2015 07:56 PM, Andres Tiraboschi wrote: >> But passing those flags I listed above, why the compiler is not doing >> those optimizations? > > Because you have said -O0. -O0 means no optimization. > > With -O0, all those other optimization options are ignored. forget -O0, compiling this way I have exactly the same problem: g++ -finline-functions -finline-functions-called-once -finline-small-functions -ftree-coalesce-inlined-vars -Wall -Wextra -pedantic -std=c++11 -Winline main.cpp (is the same but without -O0)