aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lvalue-cast-2.c
blob: bfd2e29e52c8db30a6fb56400085bf78f2f0d749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* APPLE LOCAL file non lvalue assign */
/* Allow lvalue casts in conjunction with '&'.  */
/* { dg-do compile } */
/* { dg-options "-fnon-lvalue-assign" } */

int foo (void **ptr) {
  return 1;
}

int bar (void) {
  char *string;

  return foo ((void **)&((char *)string));  /* { dg-warning "argument to .&. not really an lvalue" } */
}