diff options
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/deref.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Sema/deref.c b/test/Sema/deref.c index 7efb55e720..8f8156d81f 100644 --- a/test/Sema/deref.c +++ b/test/Sema/deref.c @@ -17,7 +17,7 @@ void foo2 (void) void foo3 (void) { void* x = 0; - void* y = &*x; + void* y = &*x; // expected-error{{address expression must be an lvalue or a function designator}} } extern const void cv1; @@ -26,3 +26,8 @@ const void *foo4 (void) return &cv1; } +extern void cv2; +void *foo5 (void) +{ + return &cv2; // expected-error{{address expression must be an lvalue or a function designator}} +} |