aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-lang.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-04-20 12:06:21 +0100
committerPhilip Herron <philip.herron@embecosm.com>2023-04-26 15:12:22 +0000
commit8f6680458524877c7803eb9821ccf5e83ecfd080 (patch)
tree4acab45d0bdb89d7d24f461119d41875c93b6d08 /gcc/rust/rust-lang.cc
parent028a5bb8ed10c202d024a544b9ca3087a0fcd90c (diff)
downloadgcc-8f6680458524877c7803eb9821ccf5e83ecfd080.zip
gcc-8f6680458524877c7803eb9821ccf5e83ecfd080.tar.gz
gcc-8f6680458524877c7803eb9821ccf5e83ecfd080.tar.bz2
gccrs: enable -Winfinite-recursion warnings by default
gcc/rust/ChangeLog: * lang.opt: add lang option flag * rust-lang.cc (grs_langhook_init_options_struct): enable by default Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/rust-lang.cc')
-rw-r--r--gcc/rust/rust-lang.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/rust-lang.cc b/gcc/rust/rust-lang.cc
index f353229..1f04701 100644
--- a/gcc/rust/rust-lang.cc
+++ b/gcc/rust/rust-lang.cc
@@ -162,6 +162,8 @@ grs_langhook_init_options_struct (struct gcc_options *opts)
opts->x_warn_unused_const_variable = 1;
/* And finally unused result for #[must_use] */
opts->x_warn_unused_result = 1;
+ /* lets warn for infinite recursion*/
+ opts->x_warn_infinite_recursion = 1;
// nothing yet - used by frontends to change specific options for the language
Rust::Session::get_instance ().init_options ();