From: Roger Sayle Date: Sat, 27 Jul 2002 21:15:39 +0000 (+0000) Subject: decl2.c (cxx_decode_option): Support -fno-builtin-foo. X-Git-Tag: releases/gcc-3.3.0~3606 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3926fe19283b9b235f35c71836cab1e011d922d;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73dbfb5a5a8b..409259a715d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-07-27 Roger Sayle + + * doc/invoke.texi: Document that both -fno-builtin-foo and + -fno-builtin are supported by the g++ front-end. + 2002-07-27 Stan Shebs * configure.in: Rename config_gtfiles to target_gtfiles. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8fc09b11d22e..8e5a93377b03 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2002-07-27 Roger Sayle + + * decl2.c (cxx_decode_option): Support -fno-builtin-foo. + 2002-07-26 Jason Merrill * call.c (build_over_call): Likewise. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0a2da36c5b08..94694dd1939d 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 427f5c47384a..5240304795f4 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -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