OSDN Git Service

* c-typeck.c (build_array_ref): Don't check for index == 0. Make
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pointer-arith-4.c
index 3e577fc..b17f9d7 100644 (file)
@@ -34,8 +34,8 @@ g (void)
   /* { dg-error "error: pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 33 } */
   0[p]; /* { dg-warning "warning: dereferencing 'void \\*' pointer" } */
   /* { dg-error "error: pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 35 } */
-  f[0]; /* { dg-error "error: subscripted value is neither array nor pointer" } */
-  0[f]; /* { dg-error "error: subscripted value is neither array nor pointer" } */
+  f[0]; /* { dg-error "error: subscripted value is pointer to function" } */
+  0[f]; /* { dg-error "error: subscripted value is pointer to function" } */
   p - p; /* { dg-error "error: pointer of type 'void \\*' used in subtraction" } */
   f - f; /* { dg-error "error: pointer to a function used in subtraction" } */
 }