On 10/05/2015 05:30 PM, Mikhail Maltsev wrote:
gcc/java/ChangeLog:
2015-10-05 Mikhail Maltsev<malts...@gmail.com>
* decl.c (java_mark_decl_local): Use flag_checking instead of
ENABLE_CHECKING.
gcc/ada/ChangeLog:
2015-10-05 Mikhail Maltsev<malts...@gmail.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
* gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
* gcc-interface/utils.c (relate_alias_sets): Likewise.
* gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
gcc_checking_assert
0003-Ada-and-Java-FE-s.patch
From e8de7d2dc24cff85b6c1e44157dad23c85e435e1 Mon Sep 17 00:00:00 2001
From: Mikhail Maltsev<malts...@gmail.com>
Date: Sun, 20 Sep 2015 05:06:01 +0300
Subject: [PATCH 3/9] Ada and Java FE's
---
gcc/ada/gcc-interface/decl.c | 4 +---
gcc/ada/gcc-interface/trans.c | 11 ++++++-----
gcc/ada/gcc-interface/utils.c | 4 +---
gcc/ada/gcc-interface/utils2.c | 20 ++++++++------------
gcc/java/decl.c | 4 +---
5 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 0f3087d..7906495 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1499,9 +1499,7 @@ relate_alias_sets (tree gnu_new_type, tree gnu_old_type,
enum alias_set_op op)
/* The alias set shouldn't be copied between array types with different
aliasing settings because this can break the aliasing relationship
between the array type and its element type. */
-#ifndef ENABLE_CHECKING
- if (flag_strict_aliasing)
-#endif
+ if (flag_checking || flag_strict_aliasing)
gcc_assert (!(TREE_CODE (gnu_new_type) == ARRAY_TYPE
&& TREE_CODE (gnu_old_type) == ARRAY_TYPE
&& TYPE_NONALIASED_COMPONENT (gnu_new_type)
I wonder who wrote that gem initially. I don't like conditional
compilation, I don't like the original code here even more. Having the
IF, but not the true/false arms conditionally compiled is just gross.
Having said that, I hope it wasn't me that wrote the code :-)
I've installed this on the trunk.
jeff