Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/c90-array-lval-6.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* PR c/12446 */ |
2 /* Origin: Keith Thompson <kst@cts.com> */ | |
3 | |
4 /* { dg-do compile } */ | |
5 /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ | |
6 | |
7 | |
8 struct s { char c[1]; }; | |
9 | |
10 extern struct s foo(void); | |
11 | |
12 void bar(void) | |
13 { | |
14 char *ptr = foo().c; /* { dg-bogus "warning" "warning in place of error" } */ | |
15 /* { dg-error "non-lvalue" "array not decaying to lvalue" { target *-*-* } .-1 } */ | |
16 } |