summaryrefslogtreecommitdiff
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-03 12:11:14 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-03 12:11:14 +0000
commitd66e9c4df6a37f5217fbcbc66296331880c2ea57 (patch)
tree112acacc2a32ac751f4392cafd57cf513779b6e5 /gcc/c-typeck.c
parentd93d495ba54e9746659d91d69119157f038a815f (diff)
downloadgcc-d66e9c4df6a37f5217fbcbc66296331880c2ea57.tar.gz
2008-09-03 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r139931 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@139933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 2246526b8bf..e9f3fc75b5d 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -2061,7 +2061,7 @@ build_array_ref (tree array, tree index, location_t loc)
if (TREE_CODE (TREE_TYPE (index)) != ARRAY_TYPE
&& TREE_CODE (TREE_TYPE (index)) != POINTER_TYPE)
{
- error ("subscripted value is neither array nor pointer");
+ error_at (loc, "subscripted value is neither array nor pointer");
return error_mark_node;
}
temp = array;
@@ -2072,13 +2072,13 @@ build_array_ref (tree array, tree index, location_t loc)
if (!INTEGRAL_TYPE_P (TREE_TYPE (index)))
{
- error ("array subscript is not an integer");
+ error_at (loc, "array subscript is not an integer");
return error_mark_node;
}
if (TREE_CODE (TREE_TYPE (TREE_TYPE (array))) == FUNCTION_TYPE)
{
- error ("subscripted value is pointer to function");
+ error_at (loc, "subscripted value is pointer to function");
return error_mark_node;
}
@@ -2125,10 +2125,10 @@ build_array_ref (tree array, tree index, location_t loc)
while (TREE_CODE (foo) == COMPONENT_REF)
foo = TREE_OPERAND (foo, 0);
if (TREE_CODE (foo) == VAR_DECL && C_DECL_REGISTER (foo))
- pedwarn (input_location, OPT_pedantic,
+ pedwarn (loc, OPT_pedantic,
"ISO C forbids subscripting %<register%> array");
else if (!flag_isoc99 && !lvalue_p (foo))
- pedwarn (input_location, OPT_pedantic,
+ pedwarn (loc, OPT_pedantic,
"ISO C90 forbids subscripting non-lvalue array");
}