// RUN: %clang_cc1 -fsyntax-only -std=c++1y -DCXX1Y -Wc++98-compat-pedantic -verify %s -DCXX1Y2
// RUN: %clang_cc1 -fsyntax-only -std=c++1y -DCXX1Y -Wc++98-compat -Werror %s -DCXX1Y2
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat-pedantic -verify %s
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -Werror %s
// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Werror %s -DCXX98
// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++98-compat-pedantic -verify %s -Wno-pre-c++14-compat-pedantic -DCXX1Y2
// -Wc++98-compat-pedantic warns on C++11 features which we accept without a
// warning in C++98 mode.
// expected-warning {{empty macro arguments are incompatible with C++98}}
; // expected-warning {{extra ';' outside of a function is incompatible with C++98}}
;
void *;
void = ; // expected-warning {{cast between pointer-to-function and pointer-to-object is incompatible with C++98}}
void *FnVoidPtr = &dlsym; // expected-warning {{cast between pointer-to-function and pointer-to-object is incompatible with C++98}}
;
int *ArraySizeConversion = new int;
// expected-warning@-2 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'size_t' is incompatible with C++98}}
// expected-warning@-4 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'int' is incompatible with C++98}}
;
extern ; // expected-warning {{extern templates are incompatible with C++98}}
long long ll1 = // expected-warning {{'long long' is incompatible with C++98}}
-42LL; // expected-warning {{'long long' is incompatible with C++98}}
unsigned long long ull1 = // expected-warning {{'long long' is incompatible with C++98}}
42ULL; // expected-warning {{'long long' is incompatible with C++98}}
int k = 0b1001;
// expected-warning@-2 {{binary integer literals are incompatible with C++ standards before C++14}}