This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/9] ubsan.c: switch from POINTER_SIZE to targetm.pointer_size ()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]