diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-12-04 13:22:31 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-12-04 13:22:31 +0000 |
commit | 7b48bf2011b4020c4a5a2d5d4149b03983f72cc2 (patch) | |
tree | b07a064ee6bddbe6ddf73a98a9c131b5ab6a0f5f /gcc/c-family | |
parent | 8cd167a5ad8baf4988e07fcbc9c9cc338c02d3d1 (diff) | |
download | gcc-tarball-7b48bf2011b4020c4a5a2d5d4149b03983f72cc2.tar.gz |
gcc-5.3.0gcc-5.3.0
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 25 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 2 | ||||
-rw-r--r-- | gcc/c-family/c-ubsan.c | 8 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 6 |
4 files changed, 37 insertions, 4 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 920783a380..2b39509cdf 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,28 @@ +2015-12-04 Release Manager + + * GCC 5.3.0 released. + +2015-10-02 Joseph Myers <joseph@codesourcery.com> + + * c.opt (std=c11): Do not describe as experimental. + (std=gnu11): Likewise. + (std=iso9899:2011): Likewise. + +2015-09-25 Marek Polacek <polacek@redhat.com> + + PR sanitizer/64906 + * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1. + +2015-08-11 Marek Polacek <polacek@redhat.com> + + Backported from mainline + 2015-08-03 Marek Polacek <polacek@redhat.com> + + PR sanitizer/66908 + * c-ubsan.c: Include gimplify.h. + (ubsan_instrument_division): Unshare OP0 and OP1. + (ubsan_instrument_shift): Likewise. + 2015-07-16 Release Manager * GCC 5.2.0 released. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 7fe7fa6007..117f89c023 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -10741,7 +10741,7 @@ get_atomic_generic_size (location_t loc, tree function, if (TREE_CODE (p) == INTEGER_CST) { int i = tree_to_uhwi (p); - if (i < 0 || (i & MEMMODEL_MASK) >= MEMMODEL_LAST) + if (i < 0 || (memmodel_base (i) >= MEMMODEL_LAST)) { warning_at (loc, OPT_Winvalid_memory_model, "invalid memory model argument %d of %qE", x + 1, diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c index a14426f962..44f8964077 100644 --- a/gcc/c-family/c-ubsan.c +++ b/gcc/c-family/c-ubsan.c @@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see #include "internal-fn.h" #include "stor-layout.h" #include "builtins.h" +#include "gimplify.h" /* Instrument division by zero and INT_MIN / -1. If not instrumenting, return NULL_TREE. */ @@ -71,6 +72,9 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) gcc_assert (TYPE_MAIN_VARIANT (TREE_TYPE (op0)) == TYPE_MAIN_VARIANT (TREE_TYPE (op1))); + op0 = unshare_expr (op0); + op1 = unshare_expr (op1); + if (TREE_CODE (type) == INTEGER_TYPE && (flag_sanitize & SANITIZE_DIVIDE)) t = fold_build2 (EQ_EXPR, boolean_type_node, @@ -117,6 +121,7 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) } } t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), op0, t); + t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), op1, t); if (flag_sanitize_undefined_trap_on_error) tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); else @@ -151,6 +156,9 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, HOST_WIDE_INT op0_prec = TYPE_PRECISION (type0); tree uprecm1 = build_int_cst (op1_utype, op0_prec - 1); + op0 = unshare_expr (op0); + op1 = unshare_expr (op1); + t = fold_convert_loc (loc, op1_utype, op1); t = fold_build2 (GT_EXPR, boolean_type_node, t, uprecm1); diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 983f4a8b94..4162566752 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1592,7 +1592,7 @@ C++ ObjC++ Alias(std=c++1z) Undocumented std=c11 C ObjC -Conform to the ISO 2011 C standard (experimental and incomplete support) +Conform to the ISO 2011 C standard std=c1x C ObjC Alias(std=c11) @@ -1648,7 +1648,7 @@ C++ ObjC++ Alias(std=gnu++1z) Undocumented std=gnu11 C ObjC -Conform to the ISO 2011 C standard with GNU extensions (experimental and incomplete support) +Conform to the ISO 2011 C standard with GNU extensions std=gnu1x C ObjC Alias(std=gnu11) @@ -1688,7 +1688,7 @@ Deprecated in favor of -std=iso9899:1999 std=iso9899:2011 C ObjC Alias(std=c11) -Conform to the ISO 2011 C standard (experimental and incomplete support) +Conform to the ISO 2011 C standard traditional Driver |