aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/parser.c3
-rw-r--r--gcc/cp/pt.c3
-rw-r--r--gcc/cp/typeck.c3
5 files changed, 15 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 898beb0..67f3f2b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-01 Aldy Hernandez <aldyh@redhat.com>
+
+ * typeck.c (build_x_indirect_ref): Add location argument.
+ * class.c (build_base_path): Pass location to build_indirect_ref.
+ * pt.c (tsubst_copy_and_build): Pass location to
+ finish_label_address_expr.
+ * parser.c (cp_parser_unary_expression): Same.
+
2008-08-31 Jason Merrill <jason@redhat.com>
Implement late-specified return type using 'auto'.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 9e98f1c..5f7d4a2 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -299,7 +299,7 @@ build_base_path (enum tree_code code,
{
expr = build_nop (build_pointer_type (target_type), expr);
if (!want_pointer)
- expr = build_indirect_ref (expr, NULL);
+ expr = build_indirect_ref (expr, NULL, EXPR_LOCATION (expr));
return expr;
}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3d74d6c..4549f8f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -5457,13 +5457,14 @@ cp_parser_unary_expression (cp_parser *parser, bool address_p, bool cast_p)
{
tree identifier;
tree expression;
+ location_t loc = cp_lexer_peek_token (parser->lexer)->location;
/* Consume the '&&' token. */
cp_lexer_consume_token (parser->lexer);
/* Look for the identifier. */
identifier = cp_parser_identifier (parser);
/* Create an expression representing the address. */
- expression = finish_label_address_expr (identifier);
+ expression = finish_label_address_expr (identifier, loc);
if (cp_parser_non_integral_constant_expression (parser,
"the address of a label"))
expression = error_mark_node;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b05c7a0..7c9165c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -11056,7 +11056,8 @@ tsubst_copy_and_build (tree t,
op1 = tsubst_non_call_postfix_expression (op1, args, complain,
in_decl);
if (TREE_CODE (op1) == LABEL_DECL)
- return finish_label_address_expr (DECL_NAME (op1));
+ return finish_label_address_expr (DECL_NAME (op1),
+ EXPR_LOCATION (op1));
return build_x_unary_op (ADDR_EXPR, op1, complain);
case PLUS_EXPR:
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 336ddcc..d60ddbd 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -2405,7 +2405,8 @@ build_x_indirect_ref (tree expr, const char *errorstring,
/* Helper function called from c-common. */
tree
-build_indirect_ref (tree ptr, const char *errorstring)
+build_indirect_ref (tree ptr, const char *errorstring,
+ location_t loc __attribute__ ((__unused__)))
{
return cp_build_indirect_ref (ptr, errorstring, tf_warning_or_error);
}