Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/lvalue-6.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* Test constraints on unary '&': PR 22367. */ |
2 | |
3 /* { dg-do compile } */ | |
4 /* { dg-options "-std=iso9899:1990 -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 /* { dg-error "taking address of expression of type 'void'" "C90 only error" { target *-*-* } .-1 } */ | |
12 | |
13 extern const void cv; | |
14 void f3 (void) { &cv; } | |
15 | |
16 extern const void *pcv; | |
17 void f4 (void) { &*pcv; } /* { dg-warning "dereferencing" } */ |