aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pointer-counted-by-10.c
blob: e2bd018a90b7c93157b8e1598795d1e5d7aa8719 (plain)
1
2
3
4
5
6
7
8
/* Testing the correct usage of attribute counted_by for pointer to void.  */
/* { dg-do compile } */
/* { dg-options "-O0 -Wpointer-arith" } */

struct pointer_array {
  int count;
  void *array __attribute__ ((counted_by (count))); /* { dg-warning "attribute is used for a pointer to void" } */
};