* [PATCH] Support -fno-builtin-foo options in C++ (take 2)
@ 2002-07-27 12:41 Roger Sayle
2002-07-27 13:14 ` Jason Merrill
0 siblings, 1 reply; 3+ messages in thread
From: Roger Sayle @ 2002-07-27 12:41 UTC (permalink / raw)
To: gcc-patches; +Cc: Neil Booth
This is just a reminder that the following patch hasn't yet been
reviewed: http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00635.html
I'd normally wait until the end of the month before posting a
reminder, but this small patch should also simplify Neil Booth's
task of integrating C/C++ switch handling. I'm resending the
patch updated to apply cleanly against current mainline. Tested
as before.
Ok for mainline?
2002-07-27 Roger Sayle <roger@eyesopen.com>
* 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.
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.551
diff -c -3 -p -r1.551 decl2.c
*** cp/decl2.c 26 Jul 2002 20:10:42 -0000 1.551
--- cp/decl2.c 27 Jul 2002 14:24:50 -0000
*************** cxx_decode_option (argc, argv)
*** 534,539 ****
--- 534,541 ----
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: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.161
diff -c -3 -p -r1.161 invoke.texi
*** doc/invoke.texi 25 Jul 2002 10:15:58 -0000 1.161
--- doc/invoke.texi 27 Jul 2002 14:24:52 -0000
*************** switch only affects the @code{asm} and @
*** 1081,1087 ****
@code{inline} is a standard keyword in ISO C99.
@item -fno-builtin
! @itemx -fno-builtin-@var{function} @r{(C and Objective-C only)}
@opindex fno-builtin
@cindex built-in functions
Don't recognize built-in functions that do not begin with
--- 1081,1087 ----
@code{inline} is a standard keyword in ISO C99.
@item -fno-builtin
! @itemx -fno-builtin-@var{function}
@opindex fno-builtin
@cindex built-in functions
Don't recognize built-in functions that do not begin with
*************** and faster, but since the function calls
*** 1099,1113 ****
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
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
--- 1099,1106 ----
cannot set a breakpoint on those calls, nor can you change the behavior
of the functions by linking with a different library.
! 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
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Support -fno-builtin-foo options in C++ (take 2)
2002-07-27 12:41 [PATCH] Support -fno-builtin-foo options in C++ (take 2) Roger Sayle
@ 2002-07-27 13:14 ` Jason Merrill
2002-07-27 14:59 ` Roger Sayle
0 siblings, 1 reply; 3+ messages in thread
From: Jason Merrill @ 2002-07-27 13:14 UTC (permalink / raw)
To: Roger Sayle; +Cc: gcc-patches, Neil Booth
>>>>> "Roger" == Roger Sayle <roger@eyesopen.com> writes:
> Ok for mainline?
Yes, thanks.
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Support -fno-builtin-foo options in C++ (take 2)
2002-07-27 13:14 ` Jason Merrill
@ 2002-07-27 14:59 ` Roger Sayle
0 siblings, 0 replies; 3+ messages in thread
From: Roger Sayle @ 2002-07-27 14:59 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches, Neil Booth
Jason Merrill wrote:
> Roger Sayle wrote:
> > Ok for mainline?
>
> Yes, thanks.
Many thanks. Commited to CVS.
Roger
--
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-27 21:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-27 12:41 [PATCH] Support -fno-builtin-foo options in C++ (take 2) Roger Sayle
2002-07-27 13:14 ` Jason Merrill
2002-07-27 14:59 ` Roger Sayle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).