aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-07-27 21:15:39 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2002-07-27 21:15:39 +0000
commita3926fe19283b9b235f35c71836cab1e011d922d (patch)
treecff4f30c1ddcc1ff61a345347e15b239e9c116a6 /gcc
parentef69da62f4cc64ed95000e85ff91821d971b6af0 (diff)
downloadgcc-a3926fe19283b9b235f35c71836cab1e011d922d.zip
gcc-a3926fe19283b9b235f35c71836cab1e011d922d.tar.gz
gcc-a3926fe19283b9b235f35c71836cab1e011d922d.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/doc/invoke.texi13
4 files changed, 14 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 73dbfb5..409259a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8fc09b1..8e5a933 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 0a2da36..94694dd 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 427f5c4..5240304 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