aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalaji V. Iyer <balaji.v.iyer@intel.com>2013-01-03 01:11:57 +0000
committerBalaji V. Iyer <balaji.v.iyer@intel.com>2013-01-03 01:11:57 +0000
commit06f1b8439c37d170a96ad93be8764b165c680825 (patch)
tree2296dad92b1512a80bf1548004be9f21d36175b6
parenta1605f8b17687ced219a0384bb005abd1bb6e4d0 (diff)
Uncapitalized some error messages and added location to some errors.
+2013-01-02 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * parser.c (cp_parser_cilk_for_expression_iterator): Uncapitalized an + error message and added appropriate location to error message. + (cp_parser_jump_statement): Likewise. + * cp-cilk.c (copy_decl_for_cilk): Likewise. + git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cilkplus@194830 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog.cilkplus7
-rw-r--r--gcc/cp/cp-cilk.c3
-rw-r--r--gcc/cp/parser.c19
3 files changed, 19 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog.cilkplus b/gcc/cp/ChangeLog.cilkplus
index ab7075ab7f3..b95aea98245 100644
--- a/gcc/cp/ChangeLog.cilkplus
+++ b/gcc/cp/ChangeLog.cilkplus
@@ -1,3 +1,10 @@
+2013-01-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * parser.c (cp_parser_cilk_for_expression_iterator): Uncapitalized an
+ error message and added appropriate location to error message.
+ (cp_parser_jump_statement): Likewise.
+ * cp-cilk.c (copy_decl_for_cilk): Likewise.
+
2012-12-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
* typeck.c (cp_build_array_ref): Added a check if array index has
diff --git a/gcc/cp/cp-cilk.c b/gcc/cp/cp-cilk.c
index 0b163f6a393..0ca90fef721 100644
--- a/gcc/cp/cp-cilk.c
+++ b/gcc/cp/cp-cilk.c
@@ -265,7 +265,8 @@ copy_decl_for_cilk (tree decl, copy_body_data *id)
return copy_decl_no_change (decl, id);
case LABEL_DECL:
- error ("Invalid use of label %q+D in spawn", decl);
+ error_at (EXPR_LOCATION (decl),
+ "invalid use of label %q+D in spawn", decl);
return error_mark_node;
case RESULT_DECL:
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 5150b19113b..ec7fbc8ec57 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -10279,7 +10279,7 @@ cp_parser_jump_statement (cp_parser* parser)
error_at (token->location, "invalid exit from OpenMP structured block");
break;
case IN_CILK_SPAWN:
- error ("Invalid exit from spawned statement");
+ error_at (token->location, "invalid exit from spawned statement");
break;
default:
gcc_unreachable ();
@@ -29138,7 +29138,7 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
if (token->type == CPP_SEMICOLON)
{
- error ("missing loop expression.\n");
+ error_at (input_location, "missing loop expression");
return error_mark_node;
}
if (token->type == CPP_PLUS_PLUS)
@@ -29147,7 +29147,7 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
token = cp_lexer_peek_token (parser->lexer);
t_code = PREINCREMENT_EXPR;
}
- else if (token->type==CPP_MINUS_MINUS)
+ else if (token->type == CPP_MINUS_MINUS)
{
cp_lexer_consume_token (parser->lexer);
token = cp_lexer_peek_token (parser->lexer);
@@ -29155,7 +29155,7 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
}
if (token->type != CPP_NAME)
{
- error ("Invalid loop expression");
+ error_at (token->location, "invalid loop expression");
cp_parser_skip_to_end_of_statement (parser);
return error_mark_node;
}
@@ -29168,7 +29168,7 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
/* Now we see if it is a decl, if not, then the loop is not valid. */
if (!DECL_P (name))
{
- error ("invalid loop increment expression.\n");
+ error_at (token->location, "invalid loop increment expression\n");
return error_mark_node;
}
@@ -29183,7 +29183,7 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
here is cases like the oen below:
for (ii = 0; ii < 10; ii++, jj++)
*/
- error ("invalid loop expression.\n");
+ error_at (token->location, "invalid loop expression\n");
return error_mark_node;
}
return build2 (t_code, void_type_node, name, NULL_TREE);
@@ -29195,7 +29195,8 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
the following case:
for (ii = 0; ii < 10; ii)
*/
- error ("The loop expression must modify the control variable.\n");
+ error_at (token->location,
+ "the loop expression must modify the control variable\n");
return error_mark_node;
}
@@ -29219,12 +29220,12 @@ cp_parser_cilk_for_expression_iterator (cp_parser *parser)
|| (token->type == CPP_OR_EQ) || (token->type == CPP_MULT_EQ)
|| (token->type == CPP_LSHIFT_EQ) || (token->type == CPP_RSHIFT_EQ))
{
- error ("Invalid loop increment operation.");
+ error_at (token->location, "invalid loop increment operation");
return error_mark_node;
}
else
{
- error ("invalid loop expression.\n");
+ error_at (token->location, "invalid loop expression.\n");
return error_mark_node;
}