This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 5/9] ubsan.c: switch from POINTER_SIZE to targetm.pointer_size ()
- From: tbsaunde+gcc at tbsaunde dot org
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 26 Jul 2015 23:10:11 -0400
- Subject: [PATCH 5/9] ubsan.c: switch from POINTER_SIZE to targetm.pointer_size ()
- Authentication-results: sourceware.org; auth=none
- References: <1437966615-21093-1-git-send-email-tbsaunde+gcc at tbsaunde dot org>
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
gcc/ChangeLog:
2015-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* ubsan.c (ubsan_encode_value): Call targetm.pointer_size ().
---
gcc/ubsan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index d75c4ee..55d9440 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -63,6 +63,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-object-size.h"
#include "tree-eh.h"
#include "tree-cfg.h"
+#include "target.h"
/* Map from a tree to a VAR_DECL tree. */
@@ -139,7 +140,7 @@ ubsan_encode_value (tree t, bool in_expand_p)
{
tree type = TREE_TYPE (t);
const unsigned int bitsize = GET_MODE_BITSIZE (TYPE_MODE (type));
- if (bitsize <= POINTER_SIZE)
+ if (bitsize <= targetm.pointer_size ())
switch (TREE_CODE (type))
{
case BOOLEAN_TYPE:
--
2.4.0