This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Rename TYPE_{MIN,MAX}VAL
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Jul 2017 15:46:56 +0200
- Subject: Re: [PATCH] Rename TYPE_{MIN,MAX}VAL
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A1FC761E7C
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1FC761E7C
- References: <00697666-4e84-5c8e-ec37-8bad1b26abee@acm.org> <CAFiYyc0F3BUVL77=xvgOuHMRM=hT=kEa09HTTW-QSkonTcxgrw@mail.gmail.com> <e090db35-ea81-7470-c938-5cf00eeadd3d@acm.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jul 19, 2017 at 08:02:27AM -0400, Nathan Sidwell wrote:
> 2017-07-19 Nathan Sidwell <nathan@acm.org>
>
> gcc/
> * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
> (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
> * tree.c (find_decls_types_r, verify_type): Use
> TYPE_{MIN,MAX}_VALUE_RAW.
> * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
> (hash_tree): Likewise.
> * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
> Likewise.
> * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
> Likewise.
>
> gcc/cp/
> * cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS,
> PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW.
>
> gcc/lto/
> * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
> (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
>
> gcc/objc/
> * objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use
> TYPE_{MIN,MAX}_VALUE_RAW.
This broke bootstrap everywhere.
I'll try to bootstrap/regtest following:
2017-07-19 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
(TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
--- gcc/ada/gcc-interface/ada-tree.h.jj 2017-06-21 13:30:26.000000000 +0200
+++ gcc/ada/gcc-interface/ada-tree.h 2017-07-19 15:45:25.849763479 +0200
@@ -209,21 +209,24 @@ do { \
this is a conflict on the minval field, but there doesn't seem to be
simple fix, so we'll live with this kludge for now. */
#define TYPE_OBJECT_RECORD_TYPE(NODE) \
- (TYPE_MINVAL (TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, ENUMERAL_TYPE)))
+ (TYPE_MIN_VALUE_RAW (TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, \
+ ENUMERAL_TYPE)))
/* For numerical types, this is the GCC lower bound of the type. The GCC
type system is based on the invariant that an object X of a given type
cannot hold at run time a value smaller than its lower bound; otherwise
the behavior is undefined. The optimizer takes advantage of this and
considers that the assertion X >= LB is always true. */
-#define TYPE_GCC_MIN_VALUE(NODE) (TYPE_MINVAL (NUMERICAL_TYPE_CHECK (NODE)))
+#define TYPE_GCC_MIN_VALUE(NODE) \
+ (TYPE_MIN_VALUE_RAW (NUMERICAL_TYPE_CHECK (NODE)))
/* For numerical types, this is the GCC upper bound of the type. The GCC
type system is based on the invariant that an object X of a given type
cannot hold at run time a value larger than its upper bound; otherwise
the behavior is undefined. The optimizer takes advantage of this and
considers that the assertion X <= UB is always true. */
-#define TYPE_GCC_MAX_VALUE(NODE) (TYPE_MAXVAL (NUMERICAL_TYPE_CHECK (NODE)))
+#define TYPE_GCC_MAX_VALUE(NODE) \
+ (TYPE_MAX_VALUE_RAW (NUMERICAL_TYPE_CHECK (NODE)))
/* For a FUNCTION_TYPE, if the subprogram has parameters passed by copy in/
copy out, this is the list of nodes used to specify the return values of
Jakub