summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-28 10:21:31 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-28 10:21:31 +0000
commit9ee468275aea8f34a5666e521e3189c7d88e3184 (patch)
tree9a5ebf6aed7503e38481012c638931f33fc1e220 /gcc/c-family/c-common.c
parent368811993c26300893ac022025d98b3ef43fbc4d (diff)
downloadgcc-9ee468275aea8f34a5666e521e3189c7d88e3184.tar.gz
2014-01-28 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn rev.207172. All is well compiled.}} git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@207179 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 35958ea41f0..3ea5763e8da 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -3974,13 +3974,15 @@ expr_original_type (tree expr)
of build_binary_op: OP0_PTR is &OP0, OP1_PTR is &OP1,
RESTYPE_PTR is &RESULT_TYPE and RESCODE_PTR is &RESULTCODE.
+ LOC is the location of the comparison.
+
If this function returns nonzero, it means that the comparison has
a constant value. What this function returns is an expression for
that value. */
tree
-shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
- enum tree_code *rescode_ptr)
+shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr,
+ tree *restype_ptr, enum tree_code *rescode_ptr)
{
tree type;
tree op0 = *op0_ptr;
@@ -3989,7 +3991,6 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
int real1, real2;
tree primop0, primop1;
enum tree_code code = *rescode_ptr;
- location_t loc = EXPR_LOC_OR_LOC (op0, input_location);
/* Throw away any conversions to wider types
already present in the operands. */
@@ -5260,7 +5261,7 @@ c_define_builtins (tree va_list_ref_type_node, tree va_list_arg_type_node)
build_common_builtin_nodes ();
- if (flag_enable_cilkplus)
+ if (flag_cilkplus)
cilk_init_builtins ();
}
@@ -11823,4 +11824,15 @@ cxx_fundamental_alignment_p (unsigned align)
TYPE_ALIGN (long_double_type_node)));
}
+/* Return true if T is a pointer to a zero-sized aggregate. */
+
+bool
+pointer_to_zero_sized_aggr_p (tree t)
+{
+ if (!POINTER_TYPE_P (t))
+ return false;
+ t = TREE_TYPE (t);
+ return (TYPE_SIZE (t) && integer_zerop (TYPE_SIZE (t)));
+}
+
#include "gt-c-family-c-common.h"