1*f4a2713aSLionel Sambuc /* RUN: %clang_cc1 -x c -std=c89 -fsyntax-only -verify -pedantic-errors -Wno-empty-translation-unit %s 2*f4a2713aSLionel Sambuc * RUN: %clang_cc1 -x c -std=c99 -fsyntax-only -verify -pedantic-errors -Wno-empty-translation-unit %s 3*f4a2713aSLionel Sambuc * RUN: %clang_cc1 -x c++ -std=c++98 -fsyntax-only -verify -pedantic-errors -Wno-empty-translation-unit %s 4*f4a2713aSLionel Sambuc * RUN: %clang_cc1 -x c++ -std=c++11 -fsyntax-only -verify -Wc++98-compat-pedantic -Wno-empty-translation-unit %s 5*f4a2713aSLionel Sambuc */ 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc #if !defined(__cplusplus) 8*f4a2713aSLionel Sambuc # if __STDC_VERSION__ < 199901L 9*f4a2713aSLionel Sambuc /* expected-error@21 {{'long long' is an extension when C99 mode is not enabled}} */ 10*f4a2713aSLionel Sambuc # else 11*f4a2713aSLionel Sambuc /* expected-no-diagnostics */ 12*f4a2713aSLionel Sambuc # endif 13*f4a2713aSLionel Sambuc #else 14*f4a2713aSLionel Sambuc # if __cplusplus < 201103L 15*f4a2713aSLionel Sambuc /* expected-error@21 {{'long long' is a C++11 extension}} */ 16*f4a2713aSLionel Sambuc # else 17*f4a2713aSLionel Sambuc /* expected-warning@21 {{'long long' is incompatible with C++98}} */ 18*f4a2713aSLionel Sambuc # endif 19*f4a2713aSLionel Sambuc #endif 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc #if 1 > 2LL 22*f4a2713aSLionel Sambuc # error should not happen 23*f4a2713aSLionel Sambuc #endif 24*f4a2713aSLionel Sambuc 25