summaryrefslogtreecommitdiff
path: root/gcc/flag-types.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-09-26 12:55:34 +0200
committerMartin Liska <marxin@gcc.gnu.org>2016-09-26 10:55:34 +0000
commit5cc6c41c2ee95585418a5820d34a4356b91dda18 (patch)
treedfdcff0777887158eb50d49f939f910bd45980c8 /gcc/flag-types.h
parent759a6472610921efcc41de343332b86d197e123c (diff)
Fix handling of -fsanitize-recover* options.
* common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN from default sanitize recover values. * doc/invoke.texi: Fix documentation related to -fsanitize=leak, -fsanitize=address, -fsanitize=thread and -fsanitize-recover. * flag-types.h: Replace couple of 1 << x to 1UL << x, make it consistent. * opts.c (finish_options): Do a generic loop over options that can be recovered. (parse_sanitizer_options): Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN. (common_handle_option): Likewise. * opts.h: Declare can_recover to sanitizer_opts_s. * c-c++-common/ubsan/sanitize-recover-1.c: New test. * c-c++-common/ubsan/sanitize-recover-2.c: New test. * c-c++-common/ubsan/sanitize-recover-3.c: New test. * c-c++-common/ubsan/sanitize-recover-4.c: New test. * c-c++-common/ubsan/sanitize-recover-5.c: New test. * c-c++-common/ubsan/sanitize-recover-6.c: New test. * c-c++-common/ubsan/sanitize-recover-7.c: New test. * c-c++-common/ubsan/sanitize-recover-8.c: New test. * c-c++-common/ubsan/sanitize-recover-9.c: New test. From-SVN: r240491
Diffstat (limited to 'gcc/flag-types.h')
-rw-r--r--gcc/flag-types.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/flag-types.h b/gcc/flag-types.h
index dd57e167098..816df6b4ad9 100644
--- a/gcc/flag-types.h
+++ b/gcc/flag-types.h
@@ -203,25 +203,25 @@ enum vect_cost_model {
/* Different instrumentation modes. */
enum sanitize_code {
/* AddressSanitizer. */
- SANITIZE_ADDRESS = 1 << 0,
- SANITIZE_USER_ADDRESS = 1 << 1,
- SANITIZE_KERNEL_ADDRESS = 1 << 2,
+ SANITIZE_ADDRESS = 1UL << 0,
+ SANITIZE_USER_ADDRESS = 1UL << 1,
+ SANITIZE_KERNEL_ADDRESS = 1UL << 2,
/* ThreadSanitizer. */
- SANITIZE_THREAD = 1 << 3,
+ SANITIZE_THREAD = 1UL << 3,
/* LeakSanitizer. */
- SANITIZE_LEAK = 1 << 4,
+ SANITIZE_LEAK = 1UL << 4,
/* UndefinedBehaviorSanitizer. */
- SANITIZE_SHIFT = 1 << 5,
- SANITIZE_DIVIDE = 1 << 6,
- SANITIZE_UNREACHABLE = 1 << 7,
- SANITIZE_VLA = 1 << 8,
- SANITIZE_NULL = 1 << 9,
- SANITIZE_RETURN = 1 << 10,
- SANITIZE_SI_OVERFLOW = 1 << 11,
- SANITIZE_BOOL = 1 << 12,
- SANITIZE_ENUM = 1 << 13,
- SANITIZE_FLOAT_DIVIDE = 1 << 14,
- SANITIZE_FLOAT_CAST = 1 << 15,
+ SANITIZE_SHIFT = 1UL << 5,
+ SANITIZE_DIVIDE = 1UL << 6,
+ SANITIZE_UNREACHABLE = 1UL << 7,
+ SANITIZE_VLA = 1UL << 8,
+ SANITIZE_NULL = 1UL << 9,
+ SANITIZE_RETURN = 1UL << 10,
+ SANITIZE_SI_OVERFLOW = 1UL << 11,
+ SANITIZE_BOOL = 1UL << 12,
+ SANITIZE_ENUM = 1UL << 13,
+ SANITIZE_FLOAT_DIVIDE = 1UL << 14,
+ SANITIZE_FLOAT_CAST = 1UL << 15,
SANITIZE_BOUNDS = 1UL << 16,
SANITIZE_ALIGNMENT = 1UL << 17,
SANITIZE_NONNULL_ATTRIBUTE = 1UL << 18,