blob: b1fd807e759e5d8024a5e567a4b5741afb0c930d [file] [log] [blame]
Richard Smithacd4d3d2011-10-15 01:18:56 +00001// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat-pedantic -verify %s
Richard Smith5d164bc2011-10-15 05:09:34 +00002// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -Werror %s
Richard Smithacd4d3d2011-10-15 01:18:56 +00003// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Werror %s
4
5// -Wc++98-compat-pedantic warns on C++11 features which we accept without a
6// warning in C++98 mode.
7
8#line 32767 // ok
9#line 32768 // expected-warning {{#line number greater than 32767 is incompatible with C++98}}
10
11#define VA_MACRO(x, ...) x // expected-warning {{variadic macros are incompatible with C++98}}
12VA_MACRO(,x) // expected-warning {{empty macro argument list is incompatible with C++98}}
Richard Smith5d164bc2011-10-15 05:09:34 +000013
14; // expected-warning {{extra ';' outside of a function is incompatible with C++98}}
15
16enum Enum {
17 Enum_value, // expected-warning {{commas at the end of enumerator lists are incompatible with C++98}}
18};