gcc 参数 -fno-builtin

-fno-builtin
      -fno-builtin-function
          Don’t recognize built-in functions that do not begin with
          __builtin_ as prefix.

          GCC normally generates special code to handle certainbuilt-in
          functions more efficiently; for instance, calls to "alloca"may
          become single instructions that adjust the stack directly,and
          calls to "memcpy" may become inline copy loops. The resulting code
          is often both smaller and faster, but since the function callsno
          longer appear as such, you cannot set a breakpoint on thosecalls,
          nor can you change the behavior of the functions by linking witha
          different library.  In addition, when a functionis recognized as a
          built-in function, GCC may use information about that functionto
          warn about problems with calls to that function, or togenerate
          more efficient code, even if the resulting code stillcontains
          calls to that function.  For example, warnings aregiven with
          -Wformat for bad calls to "printf", when "printf" is built in,and
          "strlen" is known not to modify global memory.

 

          With the -fno-builtin-function option only the built-infunction
          function is disabled.  function must not beginwith __builtin_.  If
          a function is named this is not built-in in this version ofGCC,
          this option is ignored.  There is no corresponding-fbuiltin-func-
          tion option; if you wish to enable built-in functionsselectively
          when using -fno-builtin or -ffreestanding, you may definemacros
          such as:

                  #defineabs(n)         __builtin_abs ((n))
                  #define strcpy(d,s)   __builtin_strcpy ((d), (s))

你可能感兴趣的:(Compiler)