blob: 7441584107ce0fa1c933c4fa2b599be815138bee [file] [log] [blame]
Steve Naroff9c6c3592008-01-13 17:10:08 +00001// RUN: clang -fsyntax-only -verify -std=c90 %s
2void
3foo (void)
4{
5 struct b;
6 struct b* x = 0;
7 struct b* y = &*x;
8}
9
10void foo2 (void)
11{
12 typedef int (*arrayptr)[];
13 arrayptr x = 0;
14 arrayptr y = &*x;
15}
16
17void foo3 (void)
18{
19 void* x = 0;
Steve Narofffef2f052008-01-18 00:39:39 +000020 void* y = &*x; // expected-error {{address expression must be an lvalue or a function designator}}
Steve Naroff9c6c3592008-01-13 17:10:08 +000021}
22