aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-array-notation.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2014-05-22 13:17:15 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2014-05-22 13:17:15 +0100
commitd8000f037857a297c0cd900794fd53477f65e765 (patch)
treeed6c9870c1f5cf0786a0bc5e8770bca7213ead2f /gcc/cp/cp-array-notation.c
parent6aa9ea7f4cd63b79d8bb61fab22d4f97ff5f2dea (diff)
downloadgcc-d8000f037857a297c0cd900794fd53477f65e765.zip
gcc-d8000f037857a297c0cd900794fd53477f65e765.tar.gz
gcc-d8000f037857a297c0cd900794fd53477f65e765.tar.bz2
re PR c/61271 (10 * possible coding error with logical not (!))
cp: PR c/61271 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition. testsuite: PR c/61271 * g++.dg/cilk-plus/AN/array_function.cc: New. From-SVN: r210804
Diffstat (limited to 'gcc/cp/cp-array-notation.c')
-rw-r--r--gcc/cp/cp-array-notation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c
index 0ff0967..ff82dee 100644
--- a/gcc/cp/cp-array-notation.c
+++ b/gcc/cp/cp-array-notation.c
@@ -26,7 +26,7 @@
An array notation expression has 4 major components:
1. The array name
2. Start Index
- 3. Number of elements we need to acess (we call it length)
+ 3. Number of elements we need to access (we call it length)
4. Stride
So, if we have something like A[0:5:2], we are accessing A[0], A[2], A[4],
@@ -1418,7 +1418,7 @@ cilkplus_an_triplet_types_ok_p (location_t loc, tree start_index, tree length,
error_at (loc, "stride of array notation triplet is not an integer");
return false;
}
- if (!TREE_CODE (type) == FUNCTION_TYPE)
+ if (TREE_CODE (type) == FUNCTION_TYPE)
{
error_at (loc, "array notation cannot be used with function type");
return false;