diff options
author | dvyukov <dvyukov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-08 14:32:24 +0000 |
---|---|---|
committer | dvyukov <dvyukov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-08 14:32:24 +0000 |
commit | c115ed437c2c71be637a1102687b257393619756 (patch) | |
tree | 716c3a27d9d026e9a845aa1d821bc784d6972c30 /gcc/opts.c | |
parent | df4cd96a1e31f707e0b5d835ab02083af797f016 (diff) | |
download | gcc-c115ed437c2c71be637a1102687b257393619756.tar.gz |
Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled
2016-12-08 Dmitry Vyukov <dvyukov@google.com>
* opts.c (finish_options): Enable
-fsanitize-address-use-after-scope only if -fsanitize=address is enabled
(not -fsanitize=kernel-address).
* doc/invoke.texi (-fsanitize=kernel-address):
Don't say that it enables -fsanitize-address-use-after-scope.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243441 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/opts.c b/gcc/opts.c index c61c3677a66..890da03e6a1 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -990,7 +990,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, /* Enable -fsanitize-address-use-after-scope if address sanitizer is enabled. */ - if (opts->x_flag_sanitize + if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS) && !opts_set->x_flag_sanitize_address_use_after_scope) opts->x_flag_sanitize_address_use_after_scope = true; |