aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/deref.c
blob: 7441584107ce0fa1c933c4fa2b599be815138bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: clang -fsyntax-only -verify -std=c90 %s
void
foo (void)
{
 struct b;
 struct b* x = 0;
 struct b* y = &*x;
}

void foo2 (void)
{
 typedef int (*arrayptr)[];
 arrayptr x = 0;
 arrayptr y = &*x;
}

void foo3 (void)
{
 void* x = 0;
 void* y = &*x; // expected-error {{address expression must be an lvalue or a function designator}}
}