]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl2.c (cxx_decode_option): Support -fno-builtin-foo.
authorRoger Sayle <roger@eyesopen.com>
Sat, 27 Jul 2002 21:15:39 +0000 (21:15 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 27 Jul 2002 21:15:39 +0000 (21:15 +0000)
* 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

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/doc/invoke.texi

index 73dbfb5a5a8b3e54696fff3969bc51be37494b7c..409259a715d5882ad06bd5dfd9ee9aad92470334 100644 (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.
index 8fc09b11d22e5db6c02cad31c9979da1423c9dfb..8e5a93377b0321d783c538257bb97609d169eb98 100644 (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.
index 0a2da36c5b0837356ada1c59fed0fdf8e142d485..94694dd1939dd1430edc457aa5fb5d00aebd1365 100644 (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 
index 427f5c47384af1d0391a9cb819b254af96fd3642..5240304795f47c201db31f08ac3c94a9be99816d 100644 (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