1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -verify -Wold-style-cast %s
2*0a6a1f1dSLionel Sambuc
test1()3*0a6a1f1dSLionel Sambuc void test1() {
4*0a6a1f1dSLionel Sambuc long x = (long)12; // expected-warning {{use of old-style cast}}
5*0a6a1f1dSLionel Sambuc (long)x; // expected-warning {{use of old-style cast}} expected-warning {{expression result unused}}
6*0a6a1f1dSLionel Sambuc (void**)x; // expected-warning {{use of old-style cast}} expected-warning {{expression result unused}}
7*0a6a1f1dSLionel Sambuc long y = static_cast<long>(12);
8*0a6a1f1dSLionel Sambuc (void)y;
9*0a6a1f1dSLionel Sambuc typedef void VOID;
10*0a6a1f1dSLionel Sambuc (VOID)y;
11*0a6a1f1dSLionel Sambuc }
12