Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/lvalue-7.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* Test constraints on unary '&': PR 22367. */ |
2 | |
3 /* { dg-do compile } */ | |
4 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ | |
5 | |
6 extern void v; | |
7 void f1 (void) { &v; } /* { dg-error "taking address of expression of type 'void'" } */ | |
8 | |
9 extern void *pv; | |
10 void f2 (void) { &*pv; } /* { dg-warning "dereferencing" } */ | |
11 | |
12 extern const void cv; | |
13 void f3 (void) { &cv; } | |
14 | |
15 extern const void *pcv; | |
16 void f4 (void) { &*pcv; } /* { dg-warning "dereferencing" } */ |