diff mbox series

Make sure -fexceptions is enabled when -fnon-call-exceptions is

Message ID 4016q658-o428-6212-51n2-25s156sp2sp9@fhfr.qr
State New
Headers show
Series Make sure -fexceptions is enabled when -fnon-call-exceptions is | expand

Commit Message

Richard Biener Aug. 30, 2021, 7:58 a.m. UTC
This makes -fexceptions enabled by -fnon-call-exceptions, removing
the odd state of !flag_exceptions && flag_non_call_exceptions from
middle-end consideration.

Bootstrapped and tested on x86_64-unknown-linux-gnu for all languages.

OK?
Richard.

2021-08-30  Richard Biener  <rguenther@suse.de>

	* common.opt (fexceptions): Mark
	EnabledBy(fnon-call-exceptions).
	* doc/invoke.texi (fnon-call-exceptions): Document this
	enables -fexceptions.
---
 gcc/common.opt      | 2 +-
 gcc/doc/invoke.texi | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Eric Botcazou Aug. 30, 2021, 8:05 a.m. UTC | #1
> This makes -fexceptions enabled by -fnon-call-exceptions, removing
> the odd state of !flag_exceptions && flag_non_call_exceptions from
> middle-end consideration.

FWIW fine with me.
Richard Biener Aug. 30, 2021, 12:04 p.m. UTC | #2
On Mon, 30 Aug 2021, Eric Botcazou wrote:

> > This makes -fexceptions enabled by -fnon-call-exceptions, removing
> > the odd state of !flag_exceptions && flag_non_call_exceptions from
> > middle-end consideration.
> 
> FWIW fine with me.

Thanks - pushed.

Richard.
diff mbox series

Patch

diff --git a/gcc/common.opt b/gcc/common.opt
index ed8ab5fbe13..7d69ab5ef7c 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1509,7 +1509,7 @@  Common Var(flag_emit_class_debug_always) Init(0)
 Do not suppress C++ class debug information.
 
 fexceptions
-Common Var(flag_exceptions) Optimization
+Common Var(flag_exceptions) Optimization EnabledBy(fnon-call-exceptions)
 Enable exception handling.
 
 fexpensive-optimizations
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b83bd902cec..f7bb193b51d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -16410,7 +16410,8 @@  Note that this requires platform-specific runtime support that does
 not exist everywhere.  Moreover, it only allows @emph{trapping}
 instructions to throw exceptions, i.e.@: memory references or floating-point
 instructions.  It does not allow exceptions to be thrown from
-arbitrary signal handlers such as @code{SIGALRM}.
+arbitrary signal handlers such as @code{SIGALRM}.  This enables
+@option{-fexceptions}.
 
 @item -fdelete-dead-exceptions
 @opindex fdelete-dead-exceptions