decl2.c (cxx_decode_option): Support -fno-builtin-foo.

* cp/decl2.c (cxx_decode_option): Support -fno-builtin-foo.

	* doc/invoke.texi: Document that both -fno-builtin-foo and
	-fno-builtin are supported by the g++ front-end.

From-SVN: r55802
This commit is contained in:
Roger Sayle 2002-07-27 21:15:39 +00:00 committed by Roger Sayle
parent ef69da62f4
commit a3926fe192
4 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2002-07-27 Roger Sayle <roger@eyesopen.com>
* doc/invoke.texi: Document that both -fno-builtin-foo and
-fno-builtin are supported by the g++ front-end.
2002-07-27 Stan Shebs <shebs@apple.com>
* configure.in: Rename config_gtfiles to target_gtfiles.

View File

@ -1,3 +1,7 @@
2002-07-27 Roger Sayle <roger@eyesopen.com>
* decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2002-07-26 Jason Merrill <jason@redhat.com>
* call.c (build_over_call): Likewise.

View File

@ -534,6 +534,8 @@ cxx_decode_option (argc, argv)
warning ("-fname-mangling-version is no longer supported");
return 1;
}
else if ((option_value = skip_leading_substring (p, "no-builtin-")))
disable_builtin_function (option_value);
else if (dump_switch_p (p))
;
else

View File

@ -1081,7 +1081,7 @@ switch only affects the @code{asm} and @code{typeof} keywords, since
@code{inline} is a standard keyword in ISO C99.
@item -fno-builtin
@itemx -fno-builtin-@var{function} @r{(C and Objective-C only)}
@itemx -fno-builtin-@var{function}
@opindex fno-builtin
@cindex built-in functions
Don't recognize built-in functions that do not begin with
@ -1099,15 +1099,8 @@ and faster, but since the function calls no longer appear as such, you
cannot set a breakpoint on those calls, nor can you change the behavior
of the functions by linking with a different library.
In C++, @option{-fno-builtin} is always in effect. The @option{-fbuiltin}
option has no effect. Therefore, in C++, the only way to get the
optimization benefits of built-in functions is to call the function
using the @samp{__builtin_} prefix. The GNU C++ Standard Library uses
built-in functions to implement many functions (like
@code{std::strchr}), so that you automatically get efficient code.
With the @option{-fno-builtin-@var{function}} option, not available
when compiling C++, only the built-in function @var{function} is
With the @option{-fno-builtin-@var{function}} option
only the built-in function @var{function} is
disabled. @var{function} must not begin with @samp{__builtin_}. If a
function is named this is not built-in in this version of GCC, this
option is ignored. There is no corresponding